[Checkins] SVN: z3ext.layout/trunk/ Fixed next layout calculation for root object
Nikolay Kim
fafhrd91 at gmail.com
Tue Jun 2 07:48:06 EDT 2009
Log message for revision 100583:
Fixed next layout calculation for root object
Changed:
U z3ext.layout/trunk/CHANGES.txt
U z3ext.layout/trunk/src/z3ext/layout/layout.py
-=-
Modified: z3ext.layout/trunk/CHANGES.txt
===================================================================
--- z3ext.layout/trunk/CHANGES.txt 2009-06-02 11:27:35 UTC (rev 100582)
+++ z3ext.layout/trunk/CHANGES.txt 2009-06-02 11:48:06 UTC (rev 100583)
@@ -2,6 +2,12 @@
CHANGES
=======
+2.0.8 (2009-06-03)
+------------------
+
+- Fixed next layout calculation for root object
+
+
2.0.7 (2009-04-15)
------------------
Modified: z3ext.layout/trunk/src/z3ext/layout/layout.py
===================================================================
--- z3ext.layout/trunk/src/z3ext/layout/layout.py 2009-06-02 11:27:35 UTC (rev 100582)
+++ z3ext.layout/trunk/src/z3ext/layout/layout.py 2009-06-02 11:48:06 UTC (rev 100583)
@@ -18,6 +18,7 @@
from zope import interface
from zope.publisher import browser
from zope.component import getMultiAdapter
+from zope.traversing.api import getRoot
from zope.app.pagetemplate.engine import TrustedAppPT
from zope.pagetemplate.pagetemplatefile import PageTemplateFile
@@ -119,11 +120,16 @@
else:
context = getattr(context.__parent__, '__parent__', None)
+ if context is None:
+ context = getRoot(self.context)
+
layout = queryLayout(self, self.request, context, name=self.layout)
if layout is not None:
return layout(view=view, *args, **kw)
- layout = queryLayout(self.view, self.context, self.request, name=self.layout)
+ layout = queryLayout(
+ self.view, self.context, self.request, name=self.layout)
+
if layout is not None:
return layout(*args, **kw)
More information about the Checkins
mailing list