Back to index

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

List of all members.

Public Member Functions

def breadcrumbs

Detailed Description

Definition at line 235 of file navigation.py.


Member Function Documentation

Definition at line 238 of file navigation.py.

00238 
00239     def breadcrumbs(self):
00240         context = aq_inner(self.context)
00241         request = self.request
00242         container = utils.parent(context)
00243 
00244         try:
00245             name, item_url = get_view_url(context)
00246         except AttributeError:
00247             print context
00248             raise
00249 
00250         if container is None:
00251             return ({'absolute_url': item_url,
00252                      'Title': utils.pretty_title_or_id(context, context),
00253                     },)
00254 
00255         view = getMultiAdapter((container, request), name='breadcrumbs_view')
00256         base = tuple(view.breadcrumbs())
00257 
00258         # Some things want to be hidden from the breadcrumbs
00259         if IHideFromBreadcrumbs.providedBy(context):
00260             return base
00261 
00262         if base:
00263             item_url = '%s/%s' % (base[-1]['absolute_url'], name)
00264 
00265         rootPath = getNavigationRoot(context)
00266         itemPath = '/'.join(context.getPhysicalPath())
00267 
00268         # don't show default pages in breadcrumbs or pages above the navigation root
00269         if not utils.isDefaultPage(context, request) and not rootPath.startswith(itemPath):
00270             base += ({'absolute_url': item_url,
00271                       'Title': utils.pretty_title_or_id(context, context),
00272                      },)
00273 
00274         return base
00275 

Here is the call graph for this function:

Here is the caller graph for this function:


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