[Zope] ZPT Newbie Question
Felix Ulrich-Oltean
felix@chaptereight.com
Fri, 26 Jul 2002 16:21:45 +0100
Look in the Zope Book : http://www.zope.org/Members/michel/ZB
The chapter on Advanced Page Templates, as well as the Page Templates
Reference will tell you how. Of course you might want to read the
chapter on Page Templates first.
But, basically, you define a macro in your source template by using
something like:
<span metal:define-macro="usefulbit">This is a <b>useful</b> snippet
that I can re-use elesewhere</span>
Then in your destination template, you write:
<span metal:use-macro="here/source_template.html/macros/usefulbit">
default content
</span>
Felix.
On Fri, Jul 26, 2002 at 09:01:20AM -0600, Jose Gerardo Amaya Giron wrote:
> Hello all, I'm starting to learn ZPT in Zope and I have a question.
>
> Can I make ZPT includes in my templates, like I can include dtml .
> I want to use some template code in all the rest of the templates in my
> application, is there a way to include this or I need to copy the code
> in every document?