[ZPT] Getting TAL to use multiple return info

Tino Wildenhain tino at wildenhain.de
Tue Apr 11 02:11:26 EDT 2006


Robert Sirois wrote:
> I think I might.
> 
> btw, I have been trying that code you gave me... and it doesn't work :(
> 
> Now, I'm kinda retarded :p, so I bet I am missing something stupidly simple:
> 
> I am using a python script called 'script'
> 
> and a ZPT called 'test'
> 
> script:
> 
> =====
> 
> a = 'yo'
> 
> b = 'wuzzup'
> 
> return context.test(a=a,b=b)
> 
> =====
> 
> test:
> 
> =====
> 
> <z tal:content="options/a">some interesting default text</z>
> 
> =====
> 
> What happens is that testing 'test' will raise an error where it doesn't
> know what 'a' is, and if I test 'script' it shows the content that I
> have on the 'test' ZPT, including the script and TAL.

Why are you confused? The script _calls_ the ZPT and passes on the
values. So you call the script every time - never the ZPT directly.

The ZPT does not know about the (controller-) script so it cant
work the other way round.

Regards
Tino




More information about the ZPT mailing list