[PHPTAL] Multiple conditions
ctx2002 at gmail.com
Sat May 31 01:17:52 CEST 2008
how about check path first
tal:conditions = "exists: product/notEmpty"
then use tal:replace or tal:contents to output actully product?
so you can push that "and" logic into your business model rather that
wirte it in a view model
On Sat, May 31, 2008 at 10:17 AM, Anton Andrievskij <x.meglio at gmail.com> wrote:
> The aim is to avoid setting always products.
> On Sat, May 31, 2008 at 12:03 AM, Christoph Frick <frick at sc-networks.com>
>> On Fri, May 30, 2008 at 07:04:47PM +0300, Anton Andrievskij wrote:
>> > How can I specify multiple conditions using AND logical operator and
>> > php:
>> > for one of the parts?
>> > I'm trying this but does not works:
>> > tal:condition="exists: products AND php:count(products) == 0"
>> in python an empty list is also false. iirc phptal works in the same
>> way. so maybe you are better of by setting products all the time - even
>> if the list is empty - and then just tal:condition="products"?
>> PHPTAL mailing list
>> PHPTAL at lists.motion-twin.com
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
More information about the PHPTAL