By: mgb
Date: 2007-11-29
Time: 17:27
|
Is multiple conditions in when possible?
Hi all, its me again this time around I just have the little question form the subject.
Let me give an silly example
[block.friendly_greeting;when [block.is_friend]=1OR[block.is_cute_girl]]
[block.unfriendly_greeting;default]
|
btw Skrol29, I saw your elevator movie. Quite nicely done, you should just have put a bit more attention to the sound when cutting the movie and it would have been perfect :)
|
By: mgb
Date: 2007-11-29
Time: 17:37
|
Re: Is multiple conditions in when possible?
I guess I should have payed a bit more attention to the manual.
I just tried:
[block.friendly_greeting;when [block.is_friend];when [block.is_cute_girl]]
[block.unfriendly_greeting;default]
|
And it seems to work just fine :)
Anything wrong with this approach
Thanks in advance.
|
By: mgb
Date: 2007-11-29
Time: 19:38
|
Re: Is multiple conditions in when possible?
Well this actually functions as an AND. But that was also what I needed in my live code.
I am still interested to know if an OR is possible?
mgb
|
By: Pirjo Posio
Date: 2007-11-30
Time: 08:43
|
Re: Is multiple conditions in when possible?
|
By: mgb
Date: 2007-11-30
Time: 08:53
|
Re: Is multiple conditions in when possible?
Hi Pirjo Posio
Thanks for the tip. I had to use an < comparison in my when. I haven't tested if it works with the faq approach (the one without a php function).
But i did solve it like this: (excuse me for carrying on with the silly example)
[block.friendly_greeting;when [block.is_cute_girl]=1;when [block.is_girls_age]+-18]
[block.unfriendly_greeting;default]
|
This seems to do the trick just fine.
|
|
Posting in progress.
Please wait...
|