<div style="direction: ltr;">1) don&#39;t make spaces around = in HTML attributes:<br></div><div style="direction: ltr;"><span> &nbsp; &nbsp; &nbsp; &nbsp; tal:define=&quot;query here/testquery&quot;<br><br>a mistake<br><br></span></div>
2) Why do you use repeat[&#39;result&#39;] ? Can you point us to documentation<br>where did you read it ?<br> &nbsp; &nbsp;tal:replace=&quot;result/firstname&quot; &nbsp;should work as expected or<br> &nbsp; &nbsp;tal:replace=&quot;python:result[
<div style="direction: ltr;">&#39;firstname&#39;]&quot; in case of result is<br>dictionary and you need to use python: for some reason.<br><br><a href="http://wiki.zope.org/ZPT/RepeatVariable">http://wiki.zope.org/ZPT/RepeatVariable
</a><br><br>requires repeat to be called. I used this as previously using tal:replace=&quot;result/firstname produced a keyerror as I had no dictionaries set up. The repeat variable sets-up a dictionary automatically...<br>
<br><br>3) what testquery returns ? I suppose it returns method, because you are<br>calling this method wit parameter &#39;id&#39;, but I don&#39;t think you meant it
<br>in this way.<br><br>testquery returns a ZSQL query which works and is tested. The id variable is totally meant as we are passing through a dynamic variable from a ZPT page through to the ZSQL query. At the moment to simplify things! (required..) this variable is fixed to &#39;IT&#39;.
<br><br>Thanks for your help<br></div><br><br><div><span class="gmail_quote">On 11/1/07, <b class="gmail_sendername">Radim Novotny</b> &lt;<a href="mailto:novotny.radim@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
novotny.radim@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
michael nt milne napsal(a):<br>&gt; yeah I have modified to this<br>&gt;<br>&gt; &lt;li tal:define = &quot;query here/testquery&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tal:repeat=&quot;result python:query(id=&#39;IT&#39;)&quot;&gt;<br>&gt; &lt;span tal:replace=&quot;python:repeat[&#39;result&#39;].firstname&quot;&gt;First
<br>&gt; Name&lt;/span&gt;&amp;nbsp;<br>&gt;&nbsp;&nbsp; &lt;/li&gt;<br>&gt;<br><br>1) don&#39;t make spaces around = in HTML attributes:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:define=&quot;query here/testquery&quot;<br><br>2) Why do you use repeat[&#39;result&#39;] ? Can you point us to documentation
<br>where did you read it ?<br>&nbsp;&nbsp;&nbsp;&nbsp;tal:replace=&quot;result/firstname&quot;&nbsp;&nbsp;should work as expected or<br>&nbsp;&nbsp;&nbsp;&nbsp;tal:replace=&quot;python:result[&#39;firstname&#39;]&quot; in case of result is<br>dictionary and you need to use python: for some reason.
<br><br>3) what testquery returns ? I suppose it returns method, because you are<br>calling this method wit parameter &#39;id&#39;, but I don&#39;t think you meant it<br>in this way.<br><br>--<br>Radim Novotny<br><br>_______________________________________________
<br>Zope maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:Zope@zope.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mail.zope.org/mailman/listinfo/zope</a><br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<br>
(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mail.zope.org/mailman/listinfo/zope-dev
</a> )<br></blockquote></div><br><br clear="all"><br>-- <br>michael