[ZPT] ZClass based on Page Templates?

Dieter Maurer dieter@handshake.de
Sat, 23 Nov 2002 21:09:47 +0100


Edward Pollard writes:
 > I'm trying to make my pages catalog automatically, but to do this I'm
 > told I need to create a ZClass wrapper that is catalog aware.
 > 
 > It's pretty easy to do this based off a DTML-Document. No problems.
 > 
 > But when I started with Zope I got the impression that DTML was the
 > devil - use Page Templates! I've been using Page Templates for
 > everything to date. I can't seem to base a Zclass off a Page Template,
 > as its not in the list of classes.
Making it available looks somehow like this (taken from
"Products/ZCatalog/__init__.py")

from ZClasses import createZClassForBase

createZClassForBase( ZCatalog.ZCatalog , globals()
                   , 'ZCatalogBase', 'ZCatalog' )


Dieter