When creating a Zope Product: 1) Is it possible to use ZPT instead of DTML for management views? 2) If it is possible, are there downsides? 3) Whether it's possible or not, is there any reason why the Zope Book doesn't mention it to forestall people like me from asking what is likely a FAQ? <wink> http://www.zope.org/Documentation/Books/ZDG/current/Products.stx#3-62 Thanks, // m -
Mark McEahern wrote:
When creating a Zope Product:
1) Is it possible to use ZPT instead of DTML for management views?
2) If it is possible, are there downsides?
3) Whether it's possible or not, is there any reason why the Zope Book doesn't mention it to forestall people like me from asking what is likely a FAQ? <wink>
http://www.zope.org/Documentation/Books/ZDG/current/Products.stx#3-62
1) Yes. Look at PageTemplateFile instead of DTMLFile / HTMLFile. 2) One that has me beat is trouble passing in parameters to the template upon instantiating the ZPT. See links below. 3) Because you need to write that chapter. ;) Related threads I recently began: http://mail.zope.org/pipermail/zpt/2003-February/004337.html http://mail.zope.org/pipermail/zope/2003-February/131144.html -- Jon Whitener Detroit Michigan USA
At 10:16 AM 2/18/2003, Mark McEahern wrote:
When creating a Zope Product:
1) Is it possible to use ZPT instead of DTML for management views?
Yep. Use: from Products.PageTemplates.PageTemplateFile import PageTemplateFile class my_class: some_mgt_page = PageTemplateFile('path_from_product_folder', globals())
2) If it is possible, are there downsides?
None I'm aware of.
3) Whether it's possible or not, is there any reason why the Zope Book doesn't mention it to forestall people like me from asking what is likely a FAQ? <wink>
Inertia and DTML's perception as easier, perhaps. That or nobody has written it yet. :-) HTH, Dylan
participants (3)
-
Dylan Reinhardt -
Jon Whitener -
Mark McEahern