[Zope] traversal problem

Chris Withers chris at simplistix.co.uk
Mon Mar 7 11:34:25 EST 2005


john blair wrote:
> <p tal:define="category request/form/category"> </p>
>   <table>
>     <tr tal:repeat="item category/objectValues"> 
>           <td tal:content="item/id">Id</td>
>           <td tal:content="item/title">Title</td>
>     </tr>
> </table>

Try this:

<table tal:define="category request/form/category|nothing"
        tal:condition="category">
     <tr tal:repeat="item here/?category/objectValues">
           <td tal:content="item/id">Id</td>
           <td tal:content="item/title">Title</td>
     </tr>
</table>

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the Zope mailing list