[Zope-PTK] DISCUSS: Changing template construction

Paul Everitt paul@digicool.com
Sat, 19 Feb 2000 10:37:19 -0500


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?

--Paul