[ZPT] CVS: Releases/Zope/lib/python/Products/PageTemplates - PageTemplate.py:1.16

Evan Simpson evan@zope.com
Tue, 23 Oct 2001 15:56:05 -0400


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

Modified Files:
	PageTemplate.py 
Log Message:
Added and documented the ability to control the parsing of a template as
XML or HTML with an 'is_html' property.  If this property doesn't exist,
the default content-type-sniffing behavior is used.


=== Releases/Zope/lib/python/Products/PageTemplates/PageTemplate.py 1.15 => 1.16 ===
 
     def html(self):
-        return self.content_type == 'text/html'
+        if not hasattr(getattr(self, 'aq_base', self), 'is_html'):
+            return self.content_type == 'text/html'
+        return self.is_html
 
 class _ModuleImporter:
     def __getitem__(self, module):