[ZPT] ZClass based on Page Templates?

Casey Duncan casey@zope.com
Wed, 27 Nov 2002 09:27:21 -0500


I'm not sure which is more evil, ZClasses or DTML... after some thought, =
I'd=20
have to say ZClasses... yes definitely ;^) Caveat Emptor!!

A reason why this is likely so is that page templates are not really rega=
rded=20
as content objects (whereas DTML Documents were). Now, content is in the =
eye=20
of the author, and one man's trash being another's content and all could =
mean=20
that in your case your ZPTs are content.

I would caution though, that unless your site is all about providing ZPT=20
examples to budding Zope developers, then you are probably mixing your=20
presentation too closely with your content.

Usually, content that you Catalog is static data. This data would be pres=
ented=20
using page templates (potentially in various ways using multiple template=
s).=20
Although it might be beneficial to catalog Page template output, generall=
y=20
speaking the raw content is cataloged rather than the page template code =
or=20
output.

OTOH, feel free to exercise your free will and ignore everything I just s=
aid.

-Casey

On Friday 22 November 2002 05:18 pm, Edward Pollard wrote:
> 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.
>=20
> It's pretty easy to do this based off a DTML-Document. No problems.
>=20
> 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.
>=20
> So, er, how shall I accomplish this?
>=20
> Ed
>