[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py
Use the Zope2 TALES engine to support Zope2-compatible TALES
traversal.
Philipp von Weitershausen
philikon at philikon.de
Thu Mar 2 00:42:26 EST 2006
Log message for revision 65715:
Use the Zope2 TALES engine to support Zope2-compatible TALES traversal.
If that is going to go away, then this will have to be done differently,
but at least this fixes several issues where the z3-style PageTemplate
implementation didn't do everything that the Zope 2 one did.
Changed:
U Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py
-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py
===================================================================
--- Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py 2006-03-02 05:08:28 UTC (rev 65714)
+++ Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py 2006-03-02 05:42:25 UTC (rev 65715)
@@ -38,6 +38,8 @@
from zope.pagetemplate.pagetemplate import PageTemplate
from zope.pagetemplate.pagetemplatefile import sniff_type
+from Products.PageTemplates.Expressions import getEngine
+
# regular expression to extract the encoding from the XML preamble
encoding_reg= re.compile('<\?xml.*?encoding="(.*?)".*?\?>', re.M)
@@ -132,6 +134,9 @@
self.ZBindings_edit(self._default_bindings)
self.pt_edit(text, content_type, encoding)
+ def pt_getEngine(self):
+ return getEngine()
+
security.declareProtected(change_page_templates, 'pt_edit')
def pt_edit(self, text, content_type, encoding='utf-8'):
More information about the Zope-Checkins
mailing list