[Zope-PTK] DISCUSS: Changing template construction
Rik Hoekstra
rik.hoekstra@inghist.nl
Sat, 19 Feb 2000 23:16:11 +0100
-----Oorspronkelijk bericht-----
Van: Paul Everitt [SMTP:paul@digicool.com]
Verzonden: zaterdag 19 februari 2000 16:37
Aan: zope-ptk@zope.org; jeffrey@digicool.com
Onderwerp: [Zope-PTK] DISCUSS: Changing template construction
Jeffrey espoused an idea yesterday which I really liked. Instead
of:
<dtml-var std_header>
<h2>My Stuff</h2>
<dtml-var std_footer>
..he came up with (as standard_template):
<html>
....
<dtml-var insertedContents>
</html>
with all the site content pages as:
<dtml-template standard_template insertAs="insertedContents">
<h2>My Stuff</h2>
</dtml-template>
Thus, Jeffrey introduced a new tag that grabbed a renderer and passed
in the block as contents.
Difference number one: you don't have two things (header and footer)
to manage. Difference two: the combined header and footer are valid
HTML!!! Making the look of a site much easier to manage in tools like
Dreamweaver.
With Michel's old "multi-format document" and the "PTK Document",
Jeffrey's idea gets even easier. You don't wrap the content in a tag,
you just indicate in another part of the interface the location of the
rendering template. This makes the document just:
<h2>My Stuff</h2>
..which is the PTK way of doing contents.
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?
Hm. I like the idea. I posted some similar ideas (but much more general and (I'm afraid) complicated) to the zope-dev and zope-mozilla lists some weeks ago. Whereas they never got response, I think the problem this proposal _will not_ solve is the rendered vs non-rendered problem. This is always the big problem in Zope editing.
Rik