Parse variabel to page_template
How do I parse a variable to a page_template. My template has a record source, a Z SQL object which takes a parameter. How do I parse a var to the template so that a may parse it on to the Z SQL object? <form tal:define="objectid python:here.select_software(software_id = soft)"> <tal:r repeat="item objectid"> <option tal:attributes="value item/software_id" tal:content="item/software_name">Dummy Content</option> </tal:r> </form> \Oliver -- Oliver Marx TEKK ApS Lyngbyvej 20 2100 København Ø 39 15 80 60
First - sorry for the HTML just installed a nex mailhandler. Second request is my friend \Oliver Oliver Marx wrote:
How do I parse a variable to a page_template.
My template has a record source, a Z SQL object which takes a parameter.
How do I parse a var to the template so that a may parse it on to the Z SQL object?
<form tal:define="objectid python:here.select_software(software_id = soft)"> <tal:r repeat="item objectid"> <option tal:attributes="value item/software_id" tal:content="item/software_name">Dummy Content</option> </tal:r> </form>
\Oliver
-- Oliver Marx TEKK ApS Lyngbyvej 20 2100 København Ø 39 15 80 60
Oliver Marx writes:
How do I parse a variable to a page_template. You mean "pass" (not "parse").
You do it the same way you pass arguments to other functions. "python: myPageTemplate(posarg1, posarg2, keyarg1=val1, keyarg2=val2,...)" Inside the page template you find the arguments in the predefined variable "options". It's "args" contains the sequence of positional arguments. Keyword arguments are directly accessible via their name. Dieter
participants (2)
-
Dieter Maurer -
Oliver Marx