Hi all,
I’m a very newbie and start to developp a new snippet for the needs of my template.
Actualy it is a matter of active css menu ! I just want to alight the active button. For this it seems that I need to check document ID for saying "id=current" or not ...
My problem:
I try to use a php string compare function within the snippet which is not working as should be ...
$CurrentPage_str = "[*id*]";
if strcmp($CurrentPage_str, $LinkPage) == 0
$ShowOrNot=" id=\"current\"";
else
$ShowOrNot=" ";
$output = $ShowOrNot;
return $output;
and My snippel call would be like this:
<div id="nav">
<ul>
<li [[IM_TopMenuNav-Snippet?LinkPage=`1` ]] ><a href="[~1~]">Home</a></li>
<li [[IM_TopMenuNav-Snippet?LinkPage=`2` ]] ><a href="[~2~]">MenuPage2</a></li>
<li [[IM_TopMenuNav-Snippet?LinkPage=`3` ]] ><a href="[~3~]">MenuPage3</a></li>
</ul>
</div>
If then click on "Home", I would expect to have :
<li id="current" ><a href="[~1~]">Home</a></li>
because of LinkPage == "[*id*]" ...
Any Idea fellow ?
I hope to have been clear in my not so good english explanations ...
OHO.