[ZPT] "template/macros" not available?
Jan-Wijbrand Kolman
jw@infrae.com
Mon, 09 Sep 2002 13:46:12 +0200
Hello,
Even after wading through the ZPT mailinglist archives and
documentation on zope.org, I didn't find a definite answer to the
following issue.
Obviously, I could be doing someting wrong here, or I could have
overlooked hints in the docs/archives. Is someone willing to give some
insight? TIA!
I'm working with PageTemplates for quite some time now, however
somehow this is the first time I try to do a "use-macro" *within the
same pagetemplate* the macro is defined in. I.e.:
some_template.zpt:
-------------------------------------------------------
[snip]
<metal:block define-macro="reusable">
<!-- code to reuse in here -->
</metal:block>
[snip]
<metal:block use-macro="path/to/macros/reusable" />
[snip]
If one would *use* the macro in a *seperate* pagetemplate, the
"path/to/macros" would be something like:
some_other_template.zpt:
----------------------------------------------------------------------
[snip]
<metal:block use-macro="here/some_template.zpt/macros/reusable" />
[snip]
So, to use it *within the same* pagetemplate I thought to use the
"template" namespace. I.e.:
some_template.zpt:
--------------------------------------------------------
[snip]
<metal:block use-macro="template/macros/reusable" />
[snip]
This seems not work. However, a "self reference" like...
some_template.zpt:
-----------------------------------------------------
[snip]
<metal:block use-macro="here/some_template.zpt/macros/reusable" />
[snip]
...*does* work.
Is the "macros" atrributes/namespace/whatchamacallit not available in
the "template" namespace?
Again, it could very well be me doing something stupid here. Anyone a
suggestion?
regards,
jw
--
Jan-Wijbrand Kolman
jw@infrae.com