I have a smarty if statement as follows:
<{if $page->getURLName() eq 'big-issues' or $page->getURLName() eq 'polls' or $page->getURLName() eq 'what-we-do' or $action eq 'events' or $action eq 'blogs' or $action eq 'news'}>
I have to compare the same statements several time in the template. And its really tedious to ugly to repeat this statements several times. I know I can cache a statements and reuse it many times but I was looking if its possible to do something like this:
<{if $page->getURLName() eq 'big-issues' or 'polls' or 'what-we-do' or 'events' or $action eq 'blogs' or 'news'}>
like in PHP we could do:
$url = array ("big-issues","polls","what-we-do");
$needle = $page->getURLName();
if(in_array($needle, $centered)) {
//Do something
}
Please note that I dont have access to php code for the template so can only use smarty. Any suggestion will be highly appreciated.
Cheers.