Commit f00c680f authored by Kevin Deldycke's avatar Kevin Deldycke

Differentiate two level of layout ('container_layout' and 'content_layout'...

Differentiate two level of layout ('container_layout' and 'content_layout' instead of 'layout' only) (JPS)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8787 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 95b7c0dd
......@@ -2194,9 +2194,13 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
is why standard acquisition must be circumvented here.
"""
current = self
# First try to get a container layout
if hasattr(current, 'getContainerLayout') and current.hasContainerLayout():
return current.getContainerLayout()
# First try to get a content layout
while current is not None:
if hasattr(current, 'hasLayout') and current.hasLayout():
return current.getLayout()
if hasattr(current, 'hasContentLayout') and current.hasContentLayout():
return current.getContentLayout()
current = current.getParentValue()
if not hasattr(current, 'getApplicableLayout'):
return None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment