Hi, I am trying to execute something like: <tr tal:repeat="recordset"> <td tal:replace="recordset/fname"><a href="eachrecordresult.html?fname='recordset/fname'"> First Name </a></td> <td tal:replace="recordset/lname"> Last Name </td> </tr> Everything works fine but the hyperlink. What I want it to look in the hyperlink is something like: eachrecordresult.html?fname='chris' where eachrecord is separe ZPT which retrieves each persons record and displays it. But how it interprets it is (each looks the same): eachrecordresult.html?fname='recordset/fname' How can I solve this problem. Thanks in advance. Srikanth.
srikanth wrote:
Hi,
I am trying to execute something like:
<tr tal:repeat="recordset"> <td tal:replace="recordset/fname"><a href="eachrecordresult.html?fname='recordset/fname'"> First Name </a></td> <td tal:replace="recordset/lname"> Last Name </td> </tr>
Everything works fine but the hyperlink. What I want it to look in the hyperlink is something like: eachrecordresult.html?fname='chris' where eachrecord is separe ZPT which retrieves each persons record and displays it.
But how it interprets it is (each looks the same): eachrecordresult.html?fname='recordset/fname'
How can I solve this problem.
Thanks in advance. Srikanth.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Srikanth, just replace the range with your recordset, etc. I think this should work. <table> <tr tal:repeat="number python: range(4)"> <td><a tal:attributes="href python: str(number)">Link Stub</a></td> </tr> </table> David
srikanth wrote:
Hi,
I am trying to execute something like:
<tr tal:repeat="recordset"> <td tal:replace="recordset/fname"><a href="eachrecordresult.html?fname='recordset/fname'"> First Name </a></td> <td tal:replace="recordset/lname"> Last Name </td> </tr>
Everything works fine but the hyperlink. What I want it to look in the hyperlink is something like: eachrecordresult.html?fname='chris' where eachrecord is separe ZPT which retrieves each persons record and displays it.
But how it interprets it is (each looks the same): eachrecordresult.html?fname='recordset/fname'
How can I solve this problem.
Thanks in advance. Srikanth.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Srikanth, This is a better example, I tested it on my system against my Vendors file. <table> <tal:block define="rec_set context/zVendorName"> <tr tal:repeat="rec rec_set"> <td><a tal:attributes="href rec/vendorname"> <span tal:replace="rec/vendorname"></span> </a> </tr> </tal:block> </table> Anyway, it should be close to what your looking for I hope cause Im done now. David
srikanth wrote:
Hi,
I am trying to execute something like:
<tr tal:repeat="recordset"> <td tal:replace="recordset/fname"><a href="eachrecordresult.html?fname='recordset/fname'"> First Name </a></td> <td tal:replace="recordset/lname"> Last Name </td> </tr>
Everything works fine but the hyperlink. What I want it to look in the hyperlink is something like: eachrecordresult.html?fname='chris' where eachrecord is separe ZPT which retrieves each persons record and displays it.
But how it interprets it is (each looks the same): eachrecordresult.html?fname='recordset/fname'
you have to use the tal:attributes featur. Someting like <xx tal repeat="person persons"> <a tal:attributes="href python:'mailto:%s' % person['email']" tal:content="person/name" /> </xx> robert
How can I solve this problem.
Thanks in advance. Srikanth.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
David H -
robert -
srikanth