[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Advanced
Page Templates
webmaster at zope.org
webmaster at zope.org
Thu Dec 25 00:40:08 EST 2003
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx#3-125
---------------
Rather than using macros for chunks of presentation shared
between pages, you can use macros to define entire pages. Slots
make this possible. Here's an example macro that defines an
entire page::
<html metal:define-macro="page">
<head>
<title tal:content="here/title">The title</title>
</head>
<body>
<h1 metal:define-slot="headline"
tal:content="here/title">title</h1>
<p metal:define-slot="body">
This is the body.
</p>
<span metal:define-slot="footer">
<p>Copyright 2001 Fluffy Enterprises</p>
</span>
</body>
</html>
% Anonymous User - Dec. 25, 2003 12:34 am:
Can someone tell me why the above example doesn't work? The <h1> tag does not show up. There seems to be
something wrong with the tal:content statement. The tag renders without it.
% Anonymous User - Dec. 25, 2003 12:40 am:
Woops nevermind. here/title = the folder title which was blank - I was looking to see template/title.
More information about the ZDP
mailing list