[Zope] Generic Content Object for use with Page Templates

Tim Hicks tim@sitefusion.co.uk
Wed, 21 Aug 2002 19:21:56 +0100


I've been using Zope for a while now, and I'm a little miffed that I don't
really know the answer to this.  Having finally succumbed to the preachings
of the 'Withers Church of the Page Template', I thought I'd give them a shot
for a site I'm building.

So, I've got myself setup up with and index_html page template that I want
to use to present the content of my site.  Obviously, I could use more zpts
to hold my content, but I don't really like that idea coz I just want to
store the 'meat in the sandwich' (of standard_html_header/footer as it
was) - zpts seem overkill and potentially a little confusing for naive
users.
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx#2-90
mentions that this is not appropriate and mentions some alternative content
objects.  However, it says CMF solves this issue - and I'm not using CMF,
so...

I could use DTML Documents, but I don't want the user to be able to write
DTML really, and recent posts, coupled with ChrisMcD's 2.6 Edition Zope Book
lead me to believe that way lies the dark side.

DTML Methods clearly aren't right.  I want properties anyway.

STX - haven't used it but it looks like it could be handy.  Still, I want my
users to be able to bash out some html when editing.

Files - may be appropriate as they can just store text and can be edited
through the ZMI if less than 64KB I believe.  Still, if I want to have the
index_html zpt present the contents, I'll have to have urls explicitly of
the form file/index_html, otherwise I presume I'll just get a file download
prompt from my browser.

So, I think I'm left with Folders.  If I store my text as a property of a
Folder (and adjust my zpt to reflect this), I can have an auto-presenting
content object that doesn't require users to remember to slap the bread
around their meat (if you know what I mean ;-) ).

Are Folders the content object of choice in this case then, or am I missing
something.  BTW, I'd rather not have to use objects that aren't bundled zope
as I have to fight for every additional product that is installed.

Thoughts anyone?

tim