[Zope] How To Convert Files To Page Templates?
Andrew Milton
akm at theinternet.com.au
Tue Nov 7 10:17:19 EST 2006
+-------[ Nancy Donnelly ]----------------------
| ----- Original Message ----
| From: Paul Winkler <pw_lists at slinkp.com>
|
| On Tue, Nov 07, 2006 at 03:14:40AM -0800, Nancy Donnelly wrote:
| >> That helped a lot! I yahoo'd (can't google any more since they've sold out
| to the interests gathering >> our personal data for Homeland Security)
| "put_factory" and got this code snippet:
| >>
| >> if ext == 'dtml':
| >> from OFS.DTMLDocument import DTMLDocument
| >>
| > return DTMLDocument( '', __name__=name )
| >>
| >> So...how would I rewrite that to change it into a page template? And, more
| importantly, where is >> the documentation to do so? Yahooing didn't help on
| this. I went to my Zope installation to:
| >> {INSTALLATION}/lib/python/OFS
| >> to hunt around, but no script pointing to some "PTDocument" like there is
| with DTML.
|
| > I think you want ZopePageTemplate from lib/python/Products/PageTemplates/
|
| Hmm. Looking in that I find these two files that *might* be appropriate:
|
| PageTemplates.py
| ZopePageTemplates.py
|
| The latter is a wrapper for the former. The former defines the following class:
|
| class PageTemplate(Base):
|
| If this is the class I want to use, why only one argument? My example above
| cites exactly two arguments. And it is not a "base" I need to pass, is it?
|
| The latter defines the following class:
|
| class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
| Traversable, PropertyManager):
|
| Why so many arguments? It doesn't look like those are any of the arguments I
| need to pass. None of the other files in that folder appeared to make sense,
| either.
These are not arguments, they are baseclasses.
--
Andrew Milton
akm at theinternet.com.au
More information about the Zope
mailing list