[ZPT] passing arguments

Chris Withers chrisw@nipltd.com
Thu, 14 Mar 2002 19:37:15 +0000


Tom Deprez wrote:
> 
> why isn't it found while I call index_html? Or how can I access it when I
> pass index_html such a parameter, but when I'm in need for the parameter in
> getBody

Ew, this is a bit icky.

Basically, when you call your getBody method from the ZPT, getBody is called
like so:

getBody()

...and so it will end up with an empty options namespace.

so, to get what you want with what you currently have, you'd have to call:

<span tal:content="structure
python:here.getBody(errors=path('option/errors'));">Body goes here</span>

....however, what you really want it METAL macros, so I suggest you go and read
about them ;-)

cheers,

Chris