[ZPT] changing the order of operations

Charlie Clark charlie at begeistert.org
Thu Jul 24 20:35:51 EDT 2003


On 2003-07-24 at 08:50:58 [+0200], Jamie Heilman wrote:
> 
> You want to itterate over a set of items wrapping some in a tag with 
> attributes, and some not, based upon external criteria.  Here's bad 
> example (isPrincipiaFolderish is sick, and <a> is probably not the most 
> useful tag), but a self-contained example at any rate: <ul>
> <li tal:repeat="o here/objectValues"><a
>     tal:define="name o/getId"
>     tal:content="string:&gt;${name}&lt;"
>     tal:attributes="href string:${o/absolute_url}/;id o/getId" 
>     tal:omit-tag="not:o/isPrincipiaFolderish">objects</a></li>
> </ul>


If I understand this correctly, the link should be omitted if 
o.isPrincipiaFolderish() is not true? Wouldn't this be better just setting 
a tal:condition or I am missing something in my lack of deep Zope knowledge?

Charlie



More information about the ZPT mailing list