provide basic breadcrumbs implementation
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3284 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
e1c7de8dd9
commit
a5c44e979c
2 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2009 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -87,13 +87,13 @@ class TargetLayoutInstance(NodeLayoutInstance):
|
||||||
""" Return sublayout instances specified by the target object.
|
""" Return sublayout instances specified by the target object.
|
||||||
"""
|
"""
|
||||||
target = self.target
|
target = self.target
|
||||||
pageName = self.viewAnnotations.get('pageName', u'')
|
|
||||||
if region is None or target is None:
|
if region is None or target is None:
|
||||||
return []
|
return []
|
||||||
result = []
|
#result = []
|
||||||
|
result = super(TargetLayoutInstance, self).getLayouts(region)
|
||||||
names = region.layouts.keys()
|
names = region.layouts.keys()
|
||||||
#tp = target.context.conceptType
|
|
||||||
tp = target.context.getType()
|
tp = target.context.getType()
|
||||||
|
pageName = self.viewAnnotations.get('pageName', u'')
|
||||||
for n in tp.getClients():
|
for n in tp.getClients():
|
||||||
if n.nodeType == 'info' and n.viewName in names:
|
if n.nodeType == 'info' and n.viewName in names:
|
||||||
if pageName != n.pageName:
|
if pageName != n.pageName:
|
||||||
|
|
|
@ -62,6 +62,9 @@ class BaseView(object):
|
||||||
return '%s/.%s-%s' % (absoluteURL(self.menu, self.request),
|
return '%s/.%s-%s' % (absoluteURL(self.menu, self.request),
|
||||||
self.context.uid, normalize(self.context.title))
|
self.context.uid, normalize(self.context.title))
|
||||||
|
|
||||||
|
def breadcrumbs(self):
|
||||||
|
return [dict(label=self.title, url=self.url)]
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def authenticated(self):
|
def authenticated(self):
|
||||||
return not IUnauthenticatedPrincipal.providedBy(self.request.principal)
|
return not IUnauthenticatedPrincipal.providedBy(self.request.principal)
|
||||||
|
|
Loading…
Add table
Reference in a new issue