Back to index

plone3  3.1.7
Functions
NuPlone.setuphandlers Namespace Reference

Functions

def addSearchPortlet
def addLanguagePortlet
def importVarious

Function Documentation

def NuPlone.setuphandlers.addLanguagePortlet (   portal,
  out 
)

Definition at line 20 of file setuphandlers.py.

00020 
00021 def addLanguagePortlet(portal, out):
00022     leftColumn = getUtility(IPortletManager, name=u'plone.leftcolumn', context=portal)
00023     left = getMultiAdapter((portal, leftColumn,), IPortletAssignmentMapping, context=portal)
00024     if u'portlets.Language' not in left:
00025         print >> out, "Adding language portlet to the left column"
00026         left[u'portlets.Language'] = portlets.language.Assignment()
00027         order = [left.keys()[-1]]+left.keys()[:-1]
00028         left.updateOrder(list(order))
00029 

Here is the caller graph for this function:

def NuPlone.setuphandlers.addSearchPortlet (   portal,
  out 
)

Definition at line 11 of file setuphandlers.py.

00011 
00012 def addSearchPortlet(portal, out):
00013     leftColumn = getUtility(IPortletManager, name=u'plone.leftcolumn', context=portal)
00014     left = getMultiAdapter((portal, leftColumn,), IPortletAssignmentMapping, context=portal)
00015     if u'portlets.Search' not in left:
00016         print >> out, "Adding search portlet to the left column"
00017         left[u'portlets.Search'] = portlets.search.Assignment()
00018         order = [left.keys()[-1]]+left.keys()[:-1]
00019         left.updateOrder(list(order))

Here is the caller graph for this function:

Definition at line 30 of file setuphandlers.py.

00030 
00031 def importVarious(context):
00032     
00033     if context.readDataFile('nuplone_various.txt') is None:
00034         return
00035     
00036     site = context.getSite()
00037     out = StringIO()
00038 
00039     addSearchPortlet(site, out)
00040     addLanguagePortlet(site, out)

Here is the call graph for this function: