[Zope] Page Templates plus scripts vs DTML

Crosbie Fitch crosbie@cyberspaceengineers.org
Tue, 14 Jan 2003 17:23:44 -0000


> From: Mike Renfro
> Crosbie Fitch wrote:
> > I'm currently trying to figure out how to get an included page
> > template to acquire from the includer rather than the folder it has
> > been included from...
>
> Sounds like a namespace issue, where you need to use 'container'
> rather than 'here', or vice versa.

Hmmm. So far it seems to me that ZPTs will acquire from their location full
stop, and that the only way of getting around this is to use METAL macros to
insert stuff that then acquires from the enclosing ZPT.

For example if I have root/folder and I have root/p1_zpt that references
root/folder/p2_zpt like this: <p tal:content="structure
root/folder/p2_zpt">xxxx</p> then everything within p2_zpt will acquire with
respect to root/folder rather than root.  For example, if p2_zpt contains
"<h2 tal:content="here/title">xxxx</h2>" then that'll be the title of
'folder' rather than 'root'.

But do correct me if I've got the wrong end of the stick here...