[Zope-CVS] CVS: Products/CompositePage - slotexpr.py:1.2
Shane Hathaway
shane at zope.com
Fri Mar 5 18:03:30 EST 2004
Update of /cvs-repository/Products/CompositePage
In directory cvs.zope.org:/tmp/cvs-serv26746
Modified Files:
slotexpr.py
Log Message:
When rendering with no composite, show the default content.
Also used slot.multiple() instead of str(slot).
=== Products/CompositePage/slotexpr.py 1.1 => 1.2 ===
--- Products/CompositePage/slotexpr.py:1.1 Fri Mar 5 16:41:04 2004
+++ Products/CompositePage/slotexpr.py Fri Mar 5 18:03:29 2004
@@ -19,7 +19,7 @@
import re
-from Products.PageTemplates.TALES import CompilerError, _valid_name
+from Products.PageTemplates.TALES import CompilerError, Default, _valid_name
from interfaces import IComposite
@@ -74,10 +74,10 @@
if IComposite.isImplementedBy(context):
slot = context.slots.get(self._name, self._class_name, self._title)
# Render the slot
- return str(slot)
+ return "".join(slot.multiple())
else:
- # Show the slot expression
- return repr(self)
+ # Show the default content
+ return Default
def __repr__(self):
return 'slot:%s' % self._s
More information about the Zope-CVS
mailing list