Re: [Zope] Use Page Template to emulate standard_html_footer and header
On Thu, 21 Feb 2002, Harry Wilkinson wrote:
The usual ZPT-ish way to do this is to have one main macro (often called 'master') which has the header, the footer, and a METAL slot in between them. In any pages that you want to use the standard header and footer with, you just do metal:use-macro="here/main_template/macros/master" or similar to that, and then put your page content into a metal:fill-slot block.
So, rather than put the header and footer inside each page, you put your page content inside a standard wrapper.
I understand and have used this successfully. The problem is that I have a lot of DTML pages which I'd try to avoid rewriting to page templates. But I'd also try to avoid to duplicate code in the page template and the standard_html_footer/header.
At Thu, 21 Feb 2002 12:35:54 +0100 (CET), Robin Smidsrod wrote:
I understand and have used this successfully. The problem is that I have a lot of DTML pages which I'd try to avoid rewriting to page templates. But I'd also try to avoid to duplicate code in the page template and the standard_html_footer/header.
Not sure if this will help or not ... but why don't you modify your page template to simply include the dtml header and footer and not use the macro for the header/footer. Probably something like this ... but not sure if this will work or not. <span tal:content="structure python:here.standard_html_header(here,request)"> - j
participants (2)
-
Joseph Wayne Norton -
Robin Smidsrod