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
This commit is contained in:
parent
3b36e52ae4
commit
9b72c25b9e
1 changed files with 3 additions and 0 deletions
|
@ -109,12 +109,15 @@ class TargetLayoutInstance(NodeLayoutInstance):
|
||||||
obj = self.target.context
|
obj = self.target.context
|
||||||
tp = obj.getType()
|
tp = obj.getType()
|
||||||
found = False
|
found = False
|
||||||
|
topLevelLayout = self.context.getMenu()
|
||||||
for n in obj.getClients() + tp.getClients():
|
for n in obj.getClients() + tp.getClients():
|
||||||
if not ILayoutNode.providedBy(n):
|
if not ILayoutNode.providedBy(n):
|
||||||
continue
|
continue
|
||||||
if n.nodeType == 'info' and n.viewName in names:
|
if n.nodeType == 'info' and n.viewName in names:
|
||||||
if pageName != (n.pageName or '').strip():
|
if pageName != (n.pageName or '').strip():
|
||||||
continue
|
continue
|
||||||
|
if n.getMenu() != topLevelLayout:
|
||||||
|
continue
|
||||||
layout = region.layouts[n.viewName]
|
layout = region.layouts[n.viewName]
|
||||||
li = component.getAdapter(n, ILayoutInstance,
|
li = component.getAdapter(n, ILayoutInstance,
|
||||||
name=layout.instanceName)
|
name=layout.instanceName)
|
||||||
|
|
Loading…
Add table
Reference in a new issue