[Zope] Re: Output only the first or a particular record using TAL

Julian Yap julian_yap at yahoo.com
Wed Sep 14 19:42:01 EDT 2005


Thanks Tres, Sascha and Jirka for your help.

I used the following and it works great (without some formatting for
clarity):
<tr tal:define="customer container/getCustomerLicences"
tal:condition="customer">
    <td>Customer: <span
tal:content="python:customer[0]['full_name']"></span></td>
</tr>

The above condition checks that 'customer' is not empty.

I think I'll need to do some more reading up on "path expressions" and
"python expressions".  Still mentally confusing to me.

Julian



More information about the Zope mailing list