using overridden docs
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')"> -- Robin Becker
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 ------------------------------------------
In article <4.2.0.58.19990805103928.00d94980@lisp.atmm.nl>, Martijn Pieters <mj@antraciet.nl> writes
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. I observed this and it doesn't really do it.
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')"> I suppose this is better; however, it's not the best answer really. My standard header will end up with all sorts of conditional properties. This again is the inability to control acquisition.
-- 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 ------------------------------------------
-- Robin Becker
On Wed, Aug 04, 1999 at 10:57:32PM +0100, 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')">
i just wanted to add a "me too!" request for this feature. i'd like to be able to build up the header and footer material as i traverse down the folder hierarchy, and i've not been able to figure out a good way to do this. i had a look at Acquisition.c, but i am not familiar enough with the guts of python to decipher it, unfortunately. -- ----------------------------------------------------------------------------- Ray Lehtiniemi (rayl@mail.com)
participants (3)
-
Martijn Pieters -
Ray Lehtiniemi -
Robin Becker