[Zope-dev] using overridden docs
Martijn Pieters
mj@antraciet.nl
Thu, 05 Aug 1999 10:44:25 +0200
At 23:57 04/08/99 , Robin Becker wrote:
>Is there any way to use an over-ridden document ie I want to include the
>contents of the acquired standard_html_header within the current
>folder's standard_html_header
>
> I want to use this for the current folder ie override one property
>
><dtml-var standard_html_header>
><dtml-call "RESPONSE.setHeader('content-type','text/html')">
You could use <dtml-with "PARENTS[1]"> or <dtml-with "PARENTS[-1]"> or
something like that, but that isn't very flexible, and the first method
(PARENTS[1]) doesn't work in subfolders acquiring your header, as
PARENTS[1] will be a different, higher folder, thus causing an infinite loop.
You should probably factor out the property or element that you want to
override into a seperate document, which you override in subfolders:
Toplevel standard_html_header:
<HTML><HEAD>....... etc ....
<dtml-var extra_header_info>
</HEAD>
where extra_header_info is an empty string property on the top-level
folder. Then, in subfolders, you could override this property by setting a
new proprty, or using a DTML Method with the same id, to include things like
<dtml-call "RESPONSE.setHeader('content-type','text/html')">
--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------