Hi,
Quick question (again).
Is it possible to set multiple values in this statement?
For example, IF $page_alias eq "hem" and "home" and "home2".
{if $page_alias eq "hem"}
Thanks
Multiple values in IF-statement?
-
- New Member
- Posts: 6
- Joined: Wed Jul 03, 2013 7:15 pm
Re: Multiple values in IF-statement?
Code: Select all
{if ($page_alias == 'home') || ($page_alias == 'home2') || ($page_alias == 'home3')}
Code: Select all
{if ($page_alias == 'home') or ($page_alias == 'home2') or ($page_alias == 'home3')}
-
- New Member
- Posts: 6
- Joined: Wed Jul 03, 2013 7:15 pm
Re: Multiple values in IF-statement?
Hmm, not really working mate.
If I remove 'boka' its works fine.
Code: Select all
{if ($page_alias neq 'hem') or ($page_alias neq 'boka')}
-
- New Member
- Posts: 6
- Joined: Wed Jul 03, 2013 7:15 pm
Re: Multiple values in IF-statement?
Is it because I use neq (not equal)?
Re: Multiple values in IF-statement?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!