show pageName in breadcrumbs if available
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3294 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
0b734d550f
commit
4a65b2d87a
1 changed files with 7 additions and 1 deletions
|
@ -63,7 +63,13 @@ class BaseView(object):
|
|||
self.context.uid, normalize(self.context.title))
|
||||
|
||||
def breadcrumbs(self):
|
||||
return [dict(label=self.title, url=self.url)]
|
||||
result = [dict(label=self.title, url=self.url)]
|
||||
viewAnnotations = self.request.annotations.setdefault('loops.view', {})
|
||||
pageName = viewAnnotations.get('pageName')
|
||||
if pageName:
|
||||
result.append(dict(label=pageName.split('.')[0].title(),
|
||||
url='%s/%s' % (self.url, pageName)))
|
||||
return result
|
||||
|
||||
@Lazy
|
||||
def authenticated(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue