[Zope-CMF] Re: ZPT in CMF
Leon de Heus
leon@hapkido.nl
03 Dec 2001 14:47:38 +0100
Hm, this won't convince you, because its not a finished solution yet ;-)
But we had a lot of fun with pagetemplates in a project in which we
build a content management system using CMF the last half year.
With some parsing and adding of comments / attributes pagetemplates make
it easy to create reusable library items and editable regions in pages
(just to speak in Dreamweaver vocabulary). But it does require some
rules of working with them.
Reusable components: as reusable components (a.k.a. 'Library Items' in
Dreamweaver) the metal:use-macro elements are created and made available
for use in other pages. Depending on the editor used, they can be made
available as files (for use in Dreamweaver) or as draggable and
droppable html fragments for use in the Internet Explored editing
component. What the Dreamweaver or IE users are dragging and dropping
are the correct pieces of zpt code to use the macro, with the example
rendered inside (a la 'expand macros' setting in the ZPT edit screen).
Templates: the editable regions (Dreamweaver) and 'contentEditable'
attributes in IE map nicely on the slotdefinitions in the templates. So
its easy to go from for example a Dreamweaver template to a ZPT and
back.
Using an XML parser the pagetemplates are easily parsed and comments /
attributes needed for the editors easily added or removed.
But of course it would still need to be clear where the definitions of
the macros reside, cauz thats where the definitions need to be edited.
So the concepts used in ZPT of reusable blocks and fillable regions /
slots and the easily parsable format make it not so hard to let them
work automagically with WYSIWYG editors.
Not a perfect solution yet, so you won't be convinced ;-) but I think
the way its evolving is promising.
Sorry, just had to share my enthousiasm about that. Hope it made any
sense :)
Best,
Leon de Heus.
Op Mon 03-12-2001, om 13:00 schreef seb bacon:
> So -
>
> Pros:
>
> It's easier to read than DTML
> It makes you use pythonscripts for most logic
>
> Cons:
>
> Can be ugly and difficult. Possibly because it's still young.
> Doesn't deliver on promise to work better with designers (yet).
>
> That's 2 for and 2 against. You've still not convinced me, but I want
> to be convinced. Please try again :-)
>
> seb