[Zope-PTK] DISCUSS: Changing template construction

Christopher Petrilli petrilli@digicool.com
Thu, 24 Feb 2000 23:33:42 -0500


On 2/24/00 6:47 PM, Kevin Dangoor at kid@kendermedia.com wrote:

> 
> I like this proposal. I think it does simplify things. (Boy, people who are
> new to Zope after the PTK comes out will have nifty sites up and running
> really quickly :)
> 
> One comment: if the template attribute of the <dtml-template> tag can take
> an expression, this will also make for an easy way to do skins. (And you
> don't even have to wait for the browsers to support CSS properly)

Jeffrey and I talked about this a lot yesterday, and here's (pardon I've not
used it, just written on a whiteboard, but Jffrey will no doubt correct me,
when he stops playing with MacOS X DP3 :-)....

Here's the format we talked about:

<dtml-component template="component_template_name" insertAs="content">
...
...
...
</dtml-component>

Here's some reasoning...

* The reason he changed to <dtml-component> from <dtml-template> is that
you're not really describing a template, you're describing a component
rendered USING a template.  On further thought this seems more self evident.

* No "name" attribute.  There's also no "shortcuts".  You must spell out all
attributes and their options.  Theoretically, there could be other things
for a <dtml-component> instead of templates... i.e. widgets?

* There is a default "insertAs" attribute, 'template_contents'.  You don't
have to specify.

* Should there be a default 'template'?  We don't know :-)

Cris
-- 
| Christopher Petrilli        Python Powered        Digital Creations, Inc.
| petrilli@digicool.com                             http://www.digicool.com