Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
plone.app.portlets.portlets.navigation.Renderer Class Reference
Inheritance diagram for plone.app.portlets.portlets.navigation.Renderer:
Inheritance graph
[legend]
Collaboration diagram for plone.app.portlets.portlets.navigation.Renderer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def title
def available
def include_top
def navigation_root
def root_type_name
def root_item_class
def root_icon
def root_is_portal
def createNavTree
def getNavRoot
def getNavTree
def update
def render

Public Attributes

 properties
 urltool
 context
 request
 view
 manager
 data

Static Public Attributes

tuple recurse = ViewPageTemplateFile('navigation_recurse.pt')

Static Private Attributes

tuple _template = ViewPageTemplateFile('navigation.pt')

Detailed Description

Definition at line 118 of file navigation.py.


Constructor & Destructor Documentation

def plone.app.portlets.portlets.navigation.Renderer.__init__ (   self,
  context,
  request,
  view,
  manager,
  data 
)

Reimplemented from plone.app.portlets.portlets.base.Renderer.

Definition at line 120 of file navigation.py.

00120 
00121     def __init__(self, context, request, view, manager, data):
00122         base.Renderer.__init__(self, context, request, view, manager, data)
00123         
00124         self.properties = getToolByName(context, 'portal_properties').navtree_properties
00125         self.urltool = getToolByName(context, 'portal_url')

Here is the caller graph for this function:


Member Function Documentation

By default, portlets are available

Reimplemented from plone.app.portlets.portlets.base.Renderer.

Definition at line 130 of file navigation.py.

00130 
00131     def available(self):
00132         tree = self.getNavTree()
00133         root = self.getNavRoot()
00134         return (root is not None and len(tree['children']) > 0)

Here is the call graph for this function:

Definition at line 164 of file navigation.py.

00164 
00165     def createNavTree(self):
00166         data = self.getNavTree()
00167         
00168         bottomLevel = self.data.bottomLevel or self.properties.getProperty('bottomLevel', 0)
00169 
00170         return self.recurse(children=data.get('children', []), level=1, bottomLevel=bottomLevel)

Here is the call graph for this function:

Definition at line 174 of file navigation.py.

00174 
00175     def getNavRoot(self, _marker=[]):
00176         portal = self.urltool.getPortalObject()
00177 
00178         currentFolderOnly = self.data.currentFolderOnly or self.properties.getProperty('currentFolderOnlyInNavtree', False)
00179         topLevel = self.data.topLevel or self.properties.getProperty('topLevel', 0)
00180         
00181         rootPath = getRootPath(self.context, currentFolderOnly, topLevel, str(self.data.root))
00182         
00183         if rootPath == self.urltool.getPortalPath():
00184             return portal
00185         else:
00186             try:
00187                 return portal.unrestrictedTraverse(rootPath)
00188             except (AttributeError, KeyError,):
00189                 return portal

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 191 of file navigation.py.

00191 
00192     def getNavTree(self, _marker=[]):
00193         context = aq_inner(self.context)
00194         
00195         # Special case - if the root is supposed to be pruned, we need to
00196         # abort here
00197 
00198         queryBuilder = getMultiAdapter((context, self.data), INavigationQueryBuilder)
00199         strategy = getMultiAdapter((context, self.data), INavtreeStrategy)
00200 
00201         return buildFolderTree(context, obj=context, query=queryBuilder(), strategy=strategy)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 135 of file navigation.py.

00135 
00136     def include_top(self):
00137         return getattr(self.data, 'includeTop', self.properties.includeTop)

Definition at line 138 of file navigation.py.

00138 
00139     def navigation_root(self):
00140         return self.getNavRoot()

Here is the call graph for this function:

Reimplemented from plone.app.portlets.portlets.base.Renderer.

Definition at line 205 of file navigation.py.

00205 
00206     def render(self):
00207         return self._template()

Definition at line 155 of file navigation.py.

00155 
00156     def root_icon(self):
00157         ploneview = getMultiAdapter((self.context, self.request), name=u'plone')
00158         icon = ploneview.getIcon(self.getNavRoot())
00159         return icon.url
            

Here is the call graph for this function:

Definition at line 160 of file navigation.py.

00160 
00161     def root_is_portal(self):
00162         root = self.getNavRoot()
00163         return aq_base(root) is aq_base(self.urltool.getPortalObject())

Here is the call graph for this function:

Definition at line 145 of file navigation.py.

00145 
00146     def root_item_class(self):
00147         context = aq_inner(self.context)
00148         root = self.getNavRoot()
00149         if (aq_base(root) is aq_base(context) or
00150                 (aq_base(root) is aq_base(aq_parent(aq_inner(context))) and
00151                 utils.isDefaultPage(context, self.request, context))):
00152             return 'navTreeCurrentItem'
00153         else:
00154             return ''
            

Here is the call graph for this function:

Definition at line 141 of file navigation.py.

00141 
00142     def root_type_name(self):
00143         root = self.getNavRoot()
00144         return queryUtility(IIDNormalizer).normalize(root.portal_type)

Here is the call graph for this function:

Definition at line 126 of file navigation.py.

00126 
00127     def title(self):
00128         return self.data.name or self.properties.name

Here is the caller graph for this function:

Reimplemented from plone.app.portlets.portlets.base.Renderer.

Definition at line 202 of file navigation.py.

00202 
00203     def update(self):
00204         pass

Here is the caller graph for this function:


Member Data Documentation

tuple plone.app.portlets.portlets.navigation.Renderer._template = ViewPageTemplateFile('navigation.pt') [static, private]

Definition at line 208 of file navigation.py.

Reimplemented in plone.app.portlets.portlets.classic.Renderer.

Definition at line 75 of file base.py.

Reimplemented in plone.app.portlets.portlets.classic.Renderer.

Definition at line 80 of file base.py.

Definition at line 79 of file base.py.

Definition at line 123 of file navigation.py.

tuple plone.app.portlets.portlets.navigation.Renderer.recurse = ViewPageTemplateFile('navigation_recurse.pt') [static]

Definition at line 209 of file navigation.py.

Definition at line 76 of file base.py.

Definition at line 124 of file navigation.py.

Definition at line 77 of file base.py.


The documentation for this class was generated from the following file: