Back to index

plone3  3.1.7
Public Member Functions
CMFPlone.browser.navigation.CatalogNavigationTree Class Reference
Inheritance diagram for CMFPlone.browser.navigation.CatalogNavigationTree:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.browser.navigation.CatalogNavigationTree:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def navigationTreeRootPath
def navigationTree

Detailed Description

Definition at line 65 of file navigation.py.


Member Function Documentation

Definition at line 98 of file navigation.py.

00098 
00099     def navigationTree(self):
00100         context = aq_inner(self.context)
00101 
00102         queryBuilder = NavtreeQueryBuilder(context)
00103         query = queryBuilder()
00104 
00105         strategy = getMultiAdapter((context, self), INavtreeStrategy)
00106 
00107         return buildFolderTree(context, obj=context, query=query, strategy=strategy)

Here is the call graph for this function:

Definition at line 68 of file navigation.py.

00068 
00069     def navigationTreeRootPath(self):
00070         context = aq_inner(self.context)
00071 
00072         portal_properties = getToolByName(context, 'portal_properties')
00073         portal_url = getToolByName(context, 'portal_url')
00074 
00075         navtree_properties = getattr(portal_properties, 'navtree_properties')
00076 
00077         currentFolderOnlyInNavtree = navtree_properties.getProperty('currentFolderOnlyInNavtree', False)
00078         if currentFolderOnlyInNavtree:
00079             if context.is_folderish():
00080                 return '/'.join(context.getPhysicalPath())
00081             else:
00082                 return '/'.join(utils.parent(context).getPhysicalPath())
00083 
00084         rootPath = getNavigationRoot(context)
00085 
00086         # Adjust for topLevel
00087         topLevel = navtree_properties.getProperty('topLevel', None)
00088         if topLevel is not None and topLevel > 0:
00089             contextPath = '/'.join(context.getPhysicalPath())
00090             if not contextPath.startswith(rootPath):
00091                 return None
00092             contextSubPathElements = contextPath[len(rootPath)+1:].split('/')
00093             if len(contextSubPathElements) < topLevel:
00094                 return None
00095             rootPath = rootPath + '/' + '/'.join(contextSubPathElements[:topLevel])
00096 
00097         return rootPath

Here is the call graph for this function:


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