Tres Seaver wrote:
Hash: SHA1

yuppie wrote:
Hi Rob!

Modified: GenericSetup/trunk/PageTemplates/
--- GenericSetup/trunk/PageTemplates/    2006-05-15
13:59:50 UTC (rev 68136)
+++ GenericSetup/trunk/PageTemplates/    2006-05-15
20:02:31 UTC (rev 68137)
@@ -27,10 +27,14 @@
__used_for__ = IPageTemplate + mime_type = 'text/html'
+    suffix = '.pt'
+    supported_meta_type = 'Page Template'
+         def _exportBody(self):
         """Export the object as a file body.
-        if self.context.meta_type == 'Page Template':
+        if self.context.meta_type == self.supported_meta_type:
         return None
@@ -40,7 +44,3 @@
body = property(_exportBody, _importBody)
-    mime_type = 'text/html'
-    suffix = '.pt'

I'm trying to understand that checkin.

I don't think it is generally a good idea to limit exports to specific
meta_types. I just did that in the FolderXMLAdapter to make sure there
is no overlapping with the content handler.

But given there *is* a problem with using other
meta_types than 'Page Template': Why would anybody want to override
supported_meta_type and use _exportBody for other meta_types?

I'm betting this is to support CMFFormController's TTW templates.

that's exactly it. although, depending on how i end up proceeding w/ the skin export support (composing a reply to yuppie's other post now), it may not be necessary, after all.


Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to