<br><br><div class="gmail_quote">On Thu, Jun 25, 2009 at 00:17, Miguel Beltran R. <span dir="ltr"><<a href="mailto:yourpadre@gmail.com">yourpadre@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi list<br><br>I have 2 templates, in second template I need render a <span> only when the first template have defined a variable. <br><br>template1:<br><ul tal:define="var1 python:1"><br> <li tal:replace="structure conext/template2"></li><br>
<li tal:replace="structure python:conext.template2(var2=1)"></li><br></ul><br clear="all"><br>template2:<br><li><br> <input id="x" name="x" value="somevalue"><br>
<span tal:condition="exists: var1">span2</span><br> <span tal:condition="exists: attr/var1">span2</span><br> <span tal:condition="exists: context/var1">span2</span><br>
<span tal:condition="exists: container/var1">span2</span><br>
<span tal:condition="exists: options/var2">span3</span><br>
</li><br><br>any condition in span not work :( <br></blockquote><div><br>The 'options' namespace is your friend.<br><br>-aj <br></div></div>