[Zope] Page Template: how to reference objects in the folder above this one?
Felix Ulrich-Oltean
felix@chaptereight.com
Mon, 4 Nov 2002 17:13:34 +0000
On Mon, Nov 04, 2002 at 10:36:02AM -0600, Skip Montanaro wrote:
> /dcII
> /dcII/add_contact
> /dcII/add_contact/index_html
> /dcII/standard_footer
> /dcII/standard_header
>
> and .../index_html is a page template, how to I reference
> /dcII/standard_{header,footer}?
<span tal:replace="here/standard_header"> header</span>
will do it, as Zope objects can "acquire" stuff further up the
tree. so in this case it will keep looking in parent folders until it
finds something called "standard_header".
By the way - if standard_footer contains markup rather than just text,
you'll want to use:
<span tal:replace="structure here/standard_header"> header</span>
This will make sure that the stuff from standard_header is not
html-quoted.
hth
Felix.