[Zope] Reference to Local Context of a Macro

Paul Winkler pw_lists@slinkp.com
Fri, 13 Sep 2002 16:07:46 -0700


On Fri, Sep 13, 2002 at 10:21:51PM +0000, Florent Guillaume wrote:
> Edward Pollard  <pollej@uleth.ca> wrote:
> > I have a page. It includes a macro (some HTML) that is in a subfolder. 
> > This html needs to refer to an image file in the local context of the 
> > macro file (in the same subfolder).
> > 
> > Is this possible? I cannot determine the correct path notation for it 
> > (template and here refer to the context of the main page template 
> > calling the macro).
> 
> That's a ZPT question, you should ask it on the ZPT list.
> 
> But I believe what you want is not possible, as the macro execution is
> completely transparent to the TAL engine.

D'oh! That's what I missed.
You're doing it in a macro... the macro is inserted in the 
context template before the TAL statements contained in the macro 
are evaluated. So the TAL statements never know that they
came from a different container.


--

Paul Winkler
"Welcome to Muppet Labs, where the future is made - today!"