[Zope-CMF] Making a CMF Document render DTML

Jean-Francois.Doyon@CCRS.NRCan.gc.ca Jean-Francois.Doyon@CCRS.NRCan.gc.ca
Fri, 20 Sep 2002 11:03:09 -0400


Because having a single template applicable to all documents is too
restrictive.  I want people to be able to contribute documents, and take
advantage of the workflows, but not all documents will have the exact same
layout.  In fact there's now way for me to predict what document authors
might want. BUT I do have a template that does some stuff, like the
consistent look of the site, BUT, I do no want to dictate every detail of
the layout.  Authors have to be able to decide whether they want an image
justified left, or right, and so on. Currently this is all done by putting
HTML inside the CMF Document, which is fine.

The problem is that, in this particular case, we have tables that appear all
over the site in various documents (And featured items, and news items, etc
...).  Right now these are done as HTML inside a CMF Document.  BUT it would
make a whole lot more sense to make these tables as re-usable components
(lists, formatted search results, whatever).  The problem is that I cannot,
should not, and will not dictate where document authors can/should put these
tables/lists in their documents.

So, the best bet would be to be able to put a DTML tag inside the body,
where ever the author chooses. I could tell the authors to simply use
<dtml-var "tablegenerator(item2,item5,item22)"> in their HTML code. (Said
tables are just lists of other Zope objects)

Am I really the only one who would find this usefull?  Seems to me I would
have the best of both worlds, a fully templated DTML aware object.  I am
fully aware of the theory of seperating content from style and all that, but
in my world, that's just not practical enough.  Telling authors (we have
many) that ALL their documents should look the EXACT same (or at least have
the exact same layout) isn't acceptable. Creating various templates isn't
practical enough either, I'd have a different template for every document!

I can think of a million uses of CMF Documents containing DTML, not the
least of which is having workflows applicable to DTML rendered (renderable?)
content.

Help ? Please ? :)

J.F.

-----Original Message-----
From: Chris Withers [mailto:chrisw@nipltd.com]
Sent: Friday, September 20, 2002 4:23 AM
To: Jean-Francois.Doyon@ccrs.nrcan.gc.ca
Cc: zope-cmf@zope.org
Subject: Re: [Zope-CMF] Making a CMF Document render DTML


Jean-Francois.Doyon@CCRS.NRCan.gc.ca wrote:
> I would like to have the contents of the CMF Document render the dtml
within
> it, something not currently done.

Why?

Chris