Alistair Posted June 25, 2010 Share Posted June 25, 2010 Hi I am trying to use IF statements to highlight the active page a user is on. Currently using this: <div id="Navigation"> <ul> <li><a {if $filename eq "domainchecker"} class="Selected"{/if}href="domainchecker.php">DOMAINS</a></li> <li><a {if $filename eq "cart"} class="Selected"{/if}href="cart.php">HOSTING</a></li> <li><a {if $filename eq "clientarea"} class="Selected"{/if}href="clientarea.php">CLIENT AREA</a></li> </ul> </div> However, the problem is that sometimes when a client is on my WHMCS pages, and they click on "HOSTING" from the navigation menu, instead of highlighting just HOSTING as the active page, sometimes other pages are also highlighted as active pages, when they shouldn't be. Can anyone tell me how to stop multiple active pages or where I have gone wrong? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
tomdchi Posted June 26, 2010 Share Posted June 26, 2010 where is $filename getting its value from? Maybe something like {if $filename eq "domainchecker"} class="Selected" {else}class="NotSelected"{/if} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.