From 9b72c25b9e07cd5d48dc0fd6d8078a1918d27cf7 Mon Sep 17 00:00:00 2001 From: helmutm Date: Mon, 10 Aug 2009 06:50:07 +0000 Subject: [PATCH] check menu node when selecting a target-based layout git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3496 fd906abe-77d9-0310-91a1-e0d9ade77398 --- layout/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layout/base.py b/layout/base.py index b9d34a9..2834f8e 100644 --- a/layout/base.py +++ b/layout/base.py @@ -109,12 +109,15 @@ class TargetLayoutInstance(NodeLayoutInstance): obj = self.target.context tp = obj.getType() found = False + topLevelLayout = self.context.getMenu() for n in obj.getClients() + tp.getClients(): if not ILayoutNode.providedBy(n): continue if n.nodeType == 'info' and n.viewName in names: if pageName != (n.pageName or '').strip(): continue + if n.getMenu() != topLevelLayout: + continue layout = region.layouts[n.viewName] li = component.getAdapter(n, ILayoutInstance, name=layout.instanceName)