Forums / General / section show OR-statement
David Eriksson
Tuesday 05 July 2005 2:41:47 am
Is it possible to use OR and AND in {section show=}? I've tried a few different solutions, for example:
{section show=array('or', statement1, statement2)} {section show=statement1 show=statement2}
The first one seems to always turn out true, I suspect it's because a non-empty array equals true.
When doing it the second way the decision seems dictated by whichever statement comes last.
There's not much code within the {section}, but I'd still really prefer not having to duplicate it.
/David
Tuesday 05 July 2005 3:24:36 am
Solved; with the simple:
{section show=or(statement1, statement2)}
Found it when looking through one of the menu templates.