diff --git a/composer/layout/README.txt b/composer/layout/README.txt index db4308e..e9af1a2 100644 --- a/composer/layout/README.txt +++ b/composer/layout/README.txt @@ -28,6 +28,9 @@ manager. The layouts themselves are also specified as utilities. + >>> from cybertools.composer.layout.browser.default import page + >>> component.provideUtility(page, ILayout, name='page') + >>> from cybertools.composer.layout.browser.liquid.default import css >>> component.provideUtility(css, ILayout, name='css.liquid') diff --git a/composer/layout/base.py b/composer/layout/base.py index 3523d49..c0a9824 100644 --- a/composer/layout/base.py +++ b/composer/layout/base.py @@ -59,7 +59,8 @@ class Layout(Template): title = description = u'' category = 'default' renderer = None - order = 0 + order = 50 + sublayouts = None def __init__(self, name, regionName, **kw): self.name = name @@ -84,5 +85,6 @@ class LayoutInstance(object): def getLayouts(self, region): if region is None: return [] - return region.layouts - + sublayouts = self.template.sublayouts + return [l for l in region.layouts + if sublayouts is None or l.name in sublayouts] diff --git a/composer/layout/browser/configure.zcml b/composer/layout/browser/configure.zcml index d0897de..062ec12 100644 --- a/composer/layout/browser/configure.zcml +++ b/composer/layout/browser/configure.zcml @@ -5,6 +5,11 @@ xmlns:browser="http://namespaces.zope.org/browser" i18n_domain="cybertools.composer"> + + - - - - - Powered by Zope 3 - - - - - - - - - - - - - - diff --git a/composer/layout/browser/standard.pt b/composer/layout/browser/standard.pt index a0e90d3..376b817 100644 --- a/composer/layout/browser/standard.pt +++ b/composer/layout/browser/standard.pt @@ -1,3 +1,27 @@ + + + + + + Powered by Zope 3 + + + + + + + + + + + + + + + +