[ZPT] Generating Page Templates ..
Jean Jordaan
jean@upfrontsystems.co.za
Wed, 05 Mar 2003 11:28:07 +0200
Hi
We're parsing XML to a DOM, and generating XHTML from that.
This XHTML is returned by a 'view' method, and we're rendering
it using 'index_html' as follows:
"""
<html metal:define-macro="page">
<head>
<metal:block define-slot="head">
<title tal:content="template/title">The Title</title>
</metal:block>
</head>
<body>
<div metal:define-slot="body">
<div tal:replace="structure here/view"/>
</div>
</body>
</html>
"""
Our problem: we now want our XHTML to contain TAL attributes, and
we want it to be parsed as part of the Page Template. However, as
we insert it as 'structure', it isn't parsed. For example, we're
seeing this in the output of index_html (here/view has returned
<span tal:replace="here/templates/introduction"/>):
"""
<body>
<div>
<span tal:replace="here/templates/introduction"/>
</div>
</body>
"""
How do we get that 'introduction' template to render?
--
Jean Jordaan
http://www.upfrontsystems.co.za