[Zope-CMF] Want to build CMF type/object that has ability to handle zpt

Lynn Walton waltonl@franklin.edu
Fri, 31 Aug 2001 01:34:31 -0500


While I posted my dilemma regarding ways to reuse CONTENT in CMF in
places that are too random in their placement to be able to have a skin
that handles it for multiple documents, I didn't get a whole lot of
feedback yet.  I realize it is actually a deep topic and one that is
probably an ongoing dilemma since there isn't an easy answer on finding
the most real-world practical approach to the separation of
presentation, logic and content.

I thought this was well expressed earlier this week by Andrew Saywer
when he said on "Re-working Breadcrumbs"
<quote>
We talk about this sometimes here at ZC as well.  I'm drawn to both
sides, I
like clean, clear code, but my problem has been that if we pull all the
logic out into scripts, there is a level of 'disorderliness' (for lack
of a
better term) which follows; there is a diminishing point of return
trying to
follow code when what makes up a single page is actually found in a zpt
template, a couple objects which fill slots on the template, and a dozen

various python scripts scattered about those pages which make up the
various
logic required for a page rendering.
I don't know what the solution is, but I'm sure it's not the blanket
approach or stripping as much logic as possible out into python
scripts.  I
see our skins growing and growing to unmanageable levels possibly.
Andrew
</quote>

Nevertheless, I believe what would be best for me is to proceed with
trying to make a custom CMF object/type   that is CMF enough to take
advantage of the cataloging in the same way as more basic CMF objects
like CMFDocument,  but is based on ZPT (PageTemplate) enough that I can
put in some ZPT in the "content".

However, being the newbie that I am to CMF and ZPT and Zope (although
not python), I would really appreciate all guidance on how to go about
this. I know how to make new Products but I suspect there could be alot
of gotchas involved with trying to use ZPT as a base, that the ZPT
guru's could better predict that me.

Has anyone had a need for this kind of thing or think it would be
useful? Has anyone already implemented something like it they could
share with me?

Essentially, php, jsp, dtml, all let you throw in logic in what should
be mostly presentation, and while it CAN be abused, it can also be SUPER
practical to have this ability and it can sometimes be even cleaner than
having the tons of small fragments of logic elsewhere (like Andrew
alluded to) just because you can't mix a little in your presentation or
content.

Hope I'll get some feedback, ideas, practical how to steps, etc.   It
will be most appreciated.

Thanks,
Lynn

P.S. I hesitated on cross posting as I don't want to annoy those who are
on both lists, but I felt like it applied to both lists and there might
be some people on only one or the other who could have input or have the
same dilemma, and I wanted to catch all I could. : )