[Zope-PTK] DISCUSS: Changing template construction

Paul Everitt paul@digicool.com
Fri, 25 Feb 2000 07:36:02 -0500


My proposal went a step beyond Jeffrey's and removed the need for a tag
to be inserted.  Rather (as in Formatted Document on zope.org and
Michel's Multi-Format Document proposal), the template is specified in
the GUI.  Having it optionally be in the body would be useful, though,
for things such as HTMLFile, editing in FTP, etc.

--Paul

Christopher Petrilli wrote:
> 
> 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