[ZPT] CVS: Releases/Zope/lib/python/Products/PageTemplates - ZopePageTemplate.py:1.29.10.2

Evan Simpson evan@zope.com
Tue, 12 Mar 2002 13:28:55 -0500


Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv25285

Modified Files:
      Tag: Zope-2_5-branch
	ZopePageTemplate.py 
Log Message:
Make source.html and source.xml better behaved.

You can now invoke them like .../page.pt?:action=source.html from an editor and have it use the correct context.


=== Releases/Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py 1.29.10.1 => 1.29.10.2 ===
     PUT = document_src = Acquisition.Acquired
     index_html = None
+
+    def __before_publishing_traverse__(self, ob, request):
+        if getattr(request, '_hacked_path', 0):
+            request._hacked_path = 0
     
     def __call__(self, REQUEST, RESPONSE):
         " "
-        return self.document_src(REQUEST, RESPONSE)
+        return self.document_src(REQUEST)
 
 d = ZopePageTemplate.__dict__
 d['source.xml'] = d['source.html'] = Src()