Roy Mathew wrote:
Folks,
Does anyone know if there is a way to pass arguments from a Page Template to another? The only way I can think of is to use SESSION to hold the values, and this seems clunky as I am then forced to remove those arguments from SESSION after.
I need to do something like:
<!-- my main.pt is as follows --> <span tal:define="global length python:23"> <metal:block tal:replace="structure here/nested.pt"/> </span>
<!-- and nested.pt looks like this --> <b tal:content="length|string:nothing was passed down"/>
Either you define a macro in nested.pt and use that, or you can call nested.pt with options: <span tal:define="length python:23"> <metal:block tal:replace="structure python: here['nested.pt'](length=length)"/> </span> In nested.pt you can refer it with 'options/length'. HTH Tonico