Source (Text):
ZPT-file StandardTemplate:
<html metal:define-macro="master">
<head>
<title tal:content="template/title">The title</title>
</head>
<body>
<span metal:define-slot="content">
<!---dtml--->
</span>
</body>
</html>
Python script standard_html_header:
import string
page = context.StandardTemplate()
return page[:string.find(page, '<!---dtml--->')]
Python script standard_html_footer:
import string
page = context.StandardTemplate()
return page[string.find(page, '<!---dtml--->')+14:]
ZPT-file zpt.html:
<html metal:use-macro="here/StandardTemplate/macros/master">
<head>
<title tal:content="template/title">The title</title>
</head>
<body>
<span metal:fill-slot="content">
foobar
</span>
</body>
</html>
DTML-file dtml.html:
<dtml-var standard_html_header>
foobar
<dtml-var standard_html_footer>
|