Forums / Setup & design / is it a bug?
Marko Žmak
Thursday 03 February 2005 4:29:18 am
This code in my template:
{section show=$title_link} {section show=$title_url} Text {/section} {/section}
outputs: Text
and this code:
{section show=and($title_link,$title_url)} Text {/section}
Doesn't output anything. $title_link is a boolean, and $title_url is a string. Is this a bug ro am I doing something wrong?
-- Nothing is impossible. Not if you can imagine it! Hubert Farnsworth
Łukasz Serwatka
Thursday 03 February 2005 5:00:38 am
I didn`t test it but should work.
{section show=eq($title_link, true())} {section show=$title_url.has_content} Text {/section} {/section}
If this $title_url.has_content didn`t work try ne($title_url, '')
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Balazs Halasy
Thursday 03 February 2005 7:48:01 am
Luke,
Can you test this pelase? Report it if you find the behavior suspicious. Thanks..
Allman
Thursday 03 February 2005 8:05:33 am
Works fine...
{let title_link=true() title_url='something'} {section show=and($title_link,$title_url)} Text {/section} {/let}
Thursday 03 February 2005 10:31:03 am
Here's a detailed version of the problem. I'll repeat the codes.
1st code:
2nd code:
As far as I know this two codes should return the same values regardless of what are the values of $title_link and $title_url variables. Because that's what the "and()" operator does. Am I right?