[Zope-CVS] CVS: Products/PageDesign - PageDesign.py:1.10
Matthew T. Kromer
matt@zope.com
Fri, 21 Feb 2003 10:48:10 -0500
Update of /cvs-repository/Products/PageDesign
In directory cvs.zope.org:/tmp/cvs-serv404
Modified Files:
PageDesign.py
Log Message:
Add modified Page Design which supports the default picker
=== Products/PageDesign/PageDesign.py 1.9 => 1.10 ===
--- Products/PageDesign/PageDesign.py:1.9 Fri Jan 10 00:33:41 2003
+++ Products/PageDesign/PageDesign.py Fri Feb 21 10:48:10 2003
@@ -65,6 +65,7 @@
pre_expand = 0
_v_rendering = 0
slots = SlotProvider()
+ _picker_path = None
manage_options = (
{'label': 'Properties', 'action': 'manage_main'},
@@ -255,6 +256,20 @@
raise DesignError, 'No template configured'
return guarded_getattr(aq_parent(aq_inner(self)), id)
+ security.declareProtected(change_page_designs, 'addSetDefaultPickerPath')
+ def setDefaultPickerPath(self, path):
+ """Set the default path for the element picker
+ """
+ self._picker_path = path
+
+ security.declarePublic('getDefaultPickerPath')
+ def getDefaultPickerPath(self):
+ """Get the default path for the element picker
+ """
+ if self._picker_path:
+ return self._picker_path.split('/')
+
+ return self.aq_parent.getPhysicalPath()
security.declarePublic('computeParentPaths')
def computeParentPaths(self, path):