[Zope] [Fwd: TALs Expressions]
Brian Brinegar
brinegar at purdue.edu
Fri Jan 28 10:18:31 EST 2005
After some more searching I found my answer. The pipe is not an OR
operator in TALs. Instead it separates path expressions and the first
expression that exists is evaluated.
-Brian
Ben Last (Zope) wrote:
> At the risk of being thought somewhat lateral here...
>
>><h2 tal:condition="template/title | template/id">Has a Title or Id</h2>
>
>
> I'd do this as:
> <h2 tal:condition="python:template.title or template.id">Has a Title or Id</h2>
> ...since the rules for Python expressions are generally easier to understand or clarify with the use of parentheses. :)
>
> ben
>
>
> _______________________________________________
> Zope maillist - Zope at 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 )
More information about the Zope
mailing list