[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/ Added virtual host
support for the static tree
Roger Ineichen
roger at projekt01.ch
Tue Mar 22 20:12:47 EST 2005
Log message for revision 29648:
Added virtual host support for the static tree
Changed:
U Zope3/trunk/src/zope/app/rotterdam/navigation_macros_tablelayout.pt
U Zope3/trunk/src/zope/app/tree/browser/configure.zcml
U Zope3/trunk/src/zope/app/tree/browser/cookie.py
-=-
Modified: Zope3/trunk/src/zope/app/rotterdam/navigation_macros_tablelayout.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/navigation_macros_tablelayout.pt 2005-03-23 01:09:30 UTC (rev 29647)
+++ Zope3/trunk/src/zope/app/rotterdam/navigation_macros_tablelayout.pt 2005-03-23 01:12:47 UTC (rev 29648)
@@ -14,7 +14,7 @@
<div class="box" id="navigationTree">
<h4 i18n:translate="">Navigation</h4>
<div class="treebody">
-<tal:block define="root context/@@root_cookie_tree;
+<tal:block define="root context/@@virtualhost_cookie_tree;
result root/getFlatDicts;
nodeDictList python:result[0];
maxDepth python:result[1]">
Modified: Zope3/trunk/src/zope/app/tree/browser/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/tree/browser/configure.zcml 2005-03-23 01:09:30 UTC (rev 29647)
+++ Zope3/trunk/src/zope/app/tree/browser/configure.zcml 2005-03-23 01:12:47 UTC (rev 29648)
@@ -33,6 +33,10 @@
name="root_cookie_tree"
attribute="rootTree"
/>
+ <browser:page
+ name="virtualhost_cookie_tree"
+ attribute="virtualHostTree"
+ />
</browser:pages>
<!-- Set up the skin -->
Modified: Zope3/trunk/src/zope/app/tree/browser/cookie.py
===================================================================
--- Zope3/trunk/src/zope/app/tree/browser/cookie.py 2005-03-23 01:09:30 UTC (rev 29647)
+++ Zope3/trunk/src/zope/app/tree/browser/cookie.py 2005-03-23 01:12:47 UTC (rev 29648)
@@ -65,3 +65,14 @@
"""
root = zapi.getRoot(self.context)
return self.folderTree(root)
+
+ def virtualHostTree(self):
+ """Cookie tree with only folders and the root container as
+ root node.
+ """
+ vh = self.request.getVirtualHostRoot()
+ if vh:
+ return self.folderTree(vh)
+ else:
+ root = zapi.getRoot(self.context)
+ return self.folderTree(root)
More information about the Zope3-Checkins
mailing list