[ZPT] METAL: recursive page templates?
Raymond Penners
raymond@duologix.nl
Wed, 17 Oct 2001 10:58:07 +0200
Using ZPT, I would like to accomplish the following:
root/
+ index_html
+ template_html (a)
+ subdir/
+ index_html
+ template_html (b)
Now, I would the content (index_html files) to be completely independent
of the template, and I would like template (b) to be a refinement of
template (a). For example, template (b) uses template (a) but adds a
special "subdir" header.
Ok, so let's try to implement this:
* index_html: both files contain the following:
<html metal:use-macro="here/template_html/macros/page">
<body metal:fill-slot="body">...
* template (a):
<html metal:define-macro="page">
<body>
<img src="somelogo">
<span metal:define-slot="body">
</span>
</body>
</html>
* template (b): This is a bit of a problem. I would like to do something
like this:
<html metal:use-macro="container/../template.html"
define-macro="page">
However, METAL complains that "define-macro and use-macro cannot be used
together".
How do I implement this? Thanks,
--
Raymond Penners