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:
helmutm 2009-03-20 14:15:36 +00:00
parent e1c7de8dd9
commit a5c44e979c
2 changed files with 7 additions and 4 deletions

View file

@ -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
# 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.
"""
target = self.target
pageName = self.viewAnnotations.get('pageName', u'')
if region is None or target is None:
return []
result = []
#result = []
result = super(TargetLayoutInstance, self).getLayouts(region)
names = region.layouts.keys()
#tp = target.context.conceptType
tp = target.context.getType()
pageName = self.viewAnnotations.get('pageName', u'')
for n in tp.getClients():
if n.nodeType == 'info' and n.viewName in names:
if pageName != n.pageName:

View file

@ -62,6 +62,9 @@ class BaseView(object):
return '%s/.%s-%s' % (absoluteURL(self.menu, self.request),
self.context.uid, normalize(self.context.title))
def breadcrumbs(self):
return [dict(label=self.title, url=self.url)]
@Lazy
def authenticated(self):
return not IUnauthenticatedPrincipal.providedBy(self.request.principal)