[Zope] acquisition from parent within standard_html_header

Martijn Pieters mj@atmm.nl
Mon, 01 Mar 1999 11:11:27 +0100


At 10:44 01/03/99 , Service Informatique CHSR wrote:
>Hello,
>
>I want to *add* content to the default standard_html_header in a subfolder
>that we call, say, SF. The standard_html_header in SF reads:
>
><!--#var standard_html_header-->
><!-- other content-->
>
>But since an object acquire from itself, this did not work (infinite
>traceback,
>obviously because the stack is filled with recursive calls)
>So I wrote:
>
><!--#with aq_parent--><!--#var standard_html_header--><!--#/with>
><!-- other content-->
>
>And it works for object accessed within SF. But when I create sub-folder
>*under*
>SF, say SSF, I end up with an error.
>
>How could i write this?
>

I got it working using the following code:
<!--#with "PARENTS[-1]"--><!--#var standard_html_header--><!--#/with-->
<!-- other content -->

This only works when this code is in a sub-Folder, and the standard_html_header
can be found in the root folder.


--
M.J. Pieters, Web Developer
| ATMM http://www.atmm.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@atmm.nl http://www.atmm.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------