[Zope] RE: ZPT and SESSION variable
   
    Julian Melville
     
    jmelville@selectaustralasia.com.au
       
    Fri, 27 Sep 2002 18:04:25 +1000
    
    
  
> Thanks this works so far.  But I want to foreward one of the
> parameters to a further script inside the page template like this:
>
>    <span tal:replace="structure
> python:here.Script(options/xxx)">xxx</span>
>
> but neigther this nor
>
>    <span tal:replace="structure python:here.Script(xxx)">xxx</span>
>
> works.  Any hint here?
No problems... remember that you're speaking Python syntax inside those
calls, so you can either refer to the xxx variable directly as
options['xxx'], or you can use tal:define to make a local copy of the
variable within the ZPT. That's a better solution if you're going to use
your xxx variable in several places:
 <span tal:replace="structure python:here.Script(options['xxx'])">xxx</span>
or
 <span tal:define="xxx options/xxx"
       tal:replace="structure python:here.Script(xxx)">xxx</span>
Cheers,
Julian (gone for a beer or two... it's Friday night in Australia)