It wouldn't work quite as you suggest because of how you use tales but we have
an 'equal' tale as part of Ztal that does pretty much the same thing. You use
it as follows:
>print some good content here</div>
The | symbol can be considered an 'or' where if the first statement fails or
returns false the next statement is attempted and so on. The Ztal equal tale
does support chaining in this way. However, there is no 'built-in' support for
'and' - generally you just need to put a second condition block within the
print some good content here
Obviously the tales packaged as part of Ztal are completely useable without
needing to use the rest of Ztal :)
On 13 Apr 2011, at 14:45, Ciprian Voicu wrote:
> I've encountered lots of times the need to compare one or more pairs of
> values so I used php: modifier, but let's say would be more professional
> using some internal tal way instead of php native comparison way.
> <div tal:condition="php: listing.status == 'ACTIVE' && listing.type ==
> 'PREMIER'">print some good content here</div>
> it will be something more likely to use:
> <div tal:equal="listing/status 'ACTIVE'; listing/type 'PREMIER'">print some
> good content here</div>
> Another question.
> I use pipe (`|`) also in tal:condition to check if at least one of the
> expressions is true, but what if we would have some way to check if all
> conditional expressions are true?
> Did I understood wrong some PHPTal principles having these requests?
> Ciprian Voicu
> Ciprian Voicu
> PHPTAL mailing list
PHPTAL mailing list