[ZPT] Re: Why no properties on templates?

Dondi Bogusky dondi@purdue.edu
Thu, 17 May 2001 09:47:56 -0500


I agree. Properties on templates could open the door to new dynamic
mechanisms. I do this now with DTML documents but if I had a boolean
property to add foo (an image or a slice of html) to the template, that
would be great.

> From: Thomas Olsen <thomas@iconmedialab.dk>
> Date: Thu, 17 May 2001 01:50:14 +0200
> To: Tim Moore <tmoore@tembel.org>
> Cc: Evan Simpson <evan@digicool.com>, zpt@zope.org
> Subject: Re: [ZPT] Re: Why no properties on templates?
> 
> It would be great with properties on templates. I have a main macro
> which also includes the header section with meta tags etc. On some
> templates I need an extra meta tag fx. for refreshing a page. For now I
> have added a slot in the header that I fill if theres a need for it. I
> do this i use <div metal:fill-slot="header"> but then I end up with a
> div in my header which isn't really correct html. Is there a somewhat
> more elegant way of doing this?
> 
> Tim Moore wrote:
>> 
>> "Evan Simpson" <evan@digicool.com> writes:
>> 
>>> From: "Tim Moore" <tmoore@tembel.org>
>>>> Is there a particular reason why there's no way to set properties
>>>> on templates as you can with folders, images, DTML documents,
>>>> etc.?  I'd find it useful myself.  Is this something that might
>>>> appear in a future version of ZPT?
>>> 
>>> Partly because no one has taken the time to add them.  What's your
>>> use case?
>> 
>> Well, as I said in a previous post, I've got a master template that
>> writes the <head> section.  It includes a link to a stylesheet, but
>> that stylesheet is getting a bit large so I thought I'd break into
>> several smaller ones, if I could find a way to have each template
>> specify which ones it wants to use.  I think the most elegant way
>> would be to have a lines property on each template called
>> "stylesheets" or something that declares the sheets that it needs.
>> Then the master macro would generate a series of link elements based
>> on the values in that property.
>> 
>> Just a thought anyway :-) It's not a dire need or anything, I was just
>> curious whether it was something that could happen in the future, or
>> something that was inherently impossible for some reason.
>> 
>> --
>> Tim Moore
>> 
>> _______________________________________________
>> ZPT mailing list
>> ZPT@zope.org
>> http://lists.zope.org/mailman/listinfo/zpt
> 
> -- 
> Thomas Olsen
> Programmer
> Icon Medialab, Denmark
> Havnegade 39, 3-5 sal.
> DK-1058 Copenhagen K
> 
> Icon Office  :  +45 70 23 10 01
> Icon Fax     :  +45 33 32 02 09
> Email        :  thomas@iconmedialab.dk,tanghus@kde.org
> 
> http://www.iconmedialab.com - http://www.tanghus.dk
> 
> Do not meddle in the affairs of programmers, for they are easy to annoy,
> and have all the source code!!!
> 
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
>