Page 1 of 1

[solved]If statement not functioning

Posted: Wed Mar 02, 2011 9:30 pm
by brook
I am a newbie to CMSMS but not to programming. I don't understanding why my if statement isn't working. I put the following code into a Global Content Block:

take control of your {menu_text}{if menu_text=='Home'}H!{/if}<strong>digital shelf space.</strong>

But I get the following on the page:
take control of your Homedigital shelf space

Why isn't the H! text displaying?

Thanks in advance for the help

Re: If statement not functioning

Posted: Wed Mar 02, 2011 9:49 pm
by Dr.CSS
The menu_text etc. is not a cmsms function, if on a page you need {title} and {$page_alias} if menu_text were to work it would need $ in it...

Re: [Solved] If statement not functioning

Posted: Thu Mar 03, 2011 3:38 pm
by brook
Thanks for the guidance. The solution was to use alias:

{if $page_alias=="home"}H!{/if}