[Zope-Checkins]
CVS: Releases/Zope/lib/python/Products/PageTemplates
- PageTemplate.py:1.31 PageTemplateFile.py:1.29
ZopePageTemplate.py:1.46
Shane Hathaway
shane at zope.com
Sat Oct 4 14:57:29 EDT 2003
Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv31504
Modified Files:
PageTemplate.py PageTemplateFile.py ZopePageTemplate.py
Log Message:
Added "context", a synonym of "here", to page template namespaces.
This unifies the convention in templates, scripts, and Zope 3.
=== Releases/Zope/lib/python/Products/PageTemplates/PageTemplate.py 1.30 => 1.31 ===
--- Releases/Zope/lib/python/Products/PageTemplates/PageTemplate.py:1.30 Fri Mar 21 14:17:32 2003
+++ Releases/Zope/lib/python/Products/PageTemplates/PageTemplate.py Sat Oct 4 14:56:58 2003
@@ -69,6 +69,7 @@
parent = getattr(self, 'aq_parent', None)
if parent is not None:
c['here'] = parent
+ c['context'] = parent
c['container'] = self.aq_inner.aq_parent
while parent is not None:
self = parent
=== Releases/Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.28 => 1.29 ===
--- Releases/Zope/lib/python/Products/PageTemplates/PageTemplateFile.py:1.28 Tue Apr 22 13:48:05 2003
+++ Releases/Zope/lib/python/Products/PageTemplates/PageTemplateFile.py Sat Oct 4 14:56:58 2003
@@ -70,8 +70,10 @@
def pt_getContext(self):
root = self.getPhysicalRoot()
+ context = self._getContext()
c = {'template': self,
- 'here': self._getContext(),
+ 'here': context,
+ 'context': context,
'container': self._getContainer(),
'nothing': None,
'options': {},
=== Releases/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py 1.45 => 1.46 ===
--- Releases/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py:1.45 Sun Jul 6 06:43:56 2003
+++ Releases/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py Sat Oct 4 14:56:58 2003
@@ -172,8 +172,10 @@
def pt_getContext(self):
root = self.getPhysicalRoot()
+ context = self._getContext()
c = {'template': self,
- 'here': self._getContext(),
+ 'here': context,
+ 'context': context,
'container': self._getContainer(),
'nothing': None,
'options': {},
More information about the Zope-Checkins
mailing list