[Zope-PTK] DISCUSS: Changing template construction

Shalabh Chaturvedi shalabh@pspl.co.in
Sun, 27 Feb 2000 20:01:09 +0530


Paul Everitt (on the Zope-PTK mailing list) wrote:
>
> Jeffrey espoused an idea yesterday which I really liked. Instead
> of:
...                [snipped]

> I wonder if this should be the PTK way of doing things?  OTOH, with PTK
> Document, few people will know about the template that is rendering the
> site.
>
> Thoughts?
(full text of above msg:
http://lists.zope.org/pipermail/zope-ptk/2000-February/000347.html)


I hope you don't mind my (a PTK non-user) instrusion into the thread but I feel
this template thing has a greater scope than just the PTK.

I have just posted my ideas about it to the Zope-Mozilla list.
(http://lists.zope.org/pipermail/zope-mozilla/2000-February/000125.html)

I look at templates as 'reusable patterns' of DTML. The example given by Paul
is really the following pattern:

<dtml-var standard_html_header>
  <dtml-var text>
<dtml-var standard_html_footer>

This is simple and fixed. There could be complex patterns also. Consider the
pattern used for populating a table with some data:

<table>

   (for each columnName parameter)
       <tr><td> <dtml-var columnName>
   (end for)

</table>

If this pattern could be defined, it could be reused. And then all that would
be needed to produce a populated table would be a set of parameters
(column names and order, etc) and the template name.

There has been some activity about this idea on this (PTK) list. What is the
status?

Thanks,
Shalabh