From: Tim Lesher <tlesher@gm...> - 2005-09-07 03:15:28
Perhaps I'm not understanding parent templates, but shouldn't I be
able to initialize vars in the parent, and use them in a template? For
example, I have this in the parent.spi:
Parent says: [[=3Dfoo]]
and this in index.spy:
<spy:parent src=3D"parent.spi" />
Child says: [[=3Dfoo]]
But index.spy fails, saying foo is not defined. What am I missing here?
Tim Lesher <tlesher@...>
From: Jonathan Ellis <jonathan@ca...> - 2005-09-07 03:54:36
On Tue, 6 Sep 2005 23:15:21 -0400, "Tim Lesher" <tlesher@...>
> Perhaps I'm not understanding parent templates, but shouldn't I be
> able to initialize vars in the parent, and use them in a template?
The child spyce is executed _before_ the parent, then the parent is
The cannonical example is the standard parent.spi that acts as
header/footer and takes a title argument for the HEAD section. It's
quite legal for the parent call to be something like <spi:parent
title="=foo()" />, where there is no way to predict the value of the
title parameter without evaluating the child spyce in its entirety.
Get latest updates about Open Source Projects, Conferences and News.