[Zpt] Bootstrapping ZPT documentation with ZPT (or: Eating your own dogfood)

Todd Coram todd@digicool.com
Fri, 2 Mar 2001 11:06:23 -0500


What say ye all? Should the ZPT specs and general documentation be composed
using ZPT rather than ST?

BTW,

I can see creating a the ZPT FrontPage/HomePage as a template that includes
the body of the other templates (source).  HiperDOM had a special behavior
defined where a template could include another template. You could do stuff
like:


<body>
  <span hdom:include="Summary.html" />
  <span hdom:include="RoadMap.html" />
</body>

Where Summary.html and Roadmap.html were HiperDOM templates.  Now in ZPT,
tal:text won't work that way, right?  That is, is Summary.html and
Roadmap.html had all of the proper HTML/XML headers, they would get included
too (which isn't what we want in the above example). The only solution that
comes to mind (right now) is to declare the relevant material in
Summary.html and Roadmap.html as simple macros and do the following:

<body>
  <span metal:use-macro="Summary.html" />
  <span metal:use-macro="RoadMap.html" />
</body>

Now, this is legal (and should work!), but may break the concept of macros
as units that describe presentation rather than content. Maybe, what you
probably want to do is something like this:

<body>
  <span tal:replace="here/Summary.html/id=body" />
  <span tal:replace="here/RoadMap.html/id=body" />
</body>

or

<body>
  <span tal:replace="structure extract_element: Summary.html id=body" />
  <span tal:replace="structure extract_element : RoadMap.html id=body" />
</body>

I dunno...

-- todd