Preemo Posted December 19, 2013 Share Posted December 19, 2013 Hi all, http://www.clients.huntshosting.co.uk/ As you can see my menu is a bit messy at the moment. But I'd like to have a logged in and out menu on the bar below the site's main menu So maybe when logged out there's 'Order Now | Announcements | Pre-Sales Enquiries' etc and then when logged in 'Services | Tickets' and so on,.. How would I go about doing this? Thanks in advance Ryan 0 Quote Link to comment Share on other sites More sharing options...
druptech Posted December 20, 2013 Share Posted December 20, 2013 You should use {if $loggedin}{/if} tags in menu items 0 Quote Link to comment Share on other sites More sharing options...
Preemo Posted December 20, 2013 Author Share Posted December 20, 2013 You should use {if $loggedin}{/if} tags in menu items Thank you. What about when they're logged out, what will it show then? I think it's on the default WHMCS template, but for example when logged out it says "Login" and when you are logged in it'll display your name and a dropdown in replace of the Login Ryan 0 Quote Link to comment Share on other sites More sharing options...
jbrown Posted December 21, 2013 Share Posted December 21, 2013 Try something like this: {if $filename eq "index"} <!-- If they are on the index.php then shows these menu links --> <li><a href="#" id="homelink">SECURELIVE</a></li> <li><a href="#" id="pricinglink">PLANS & PRICING</a></li> <li><a href="#" id="serviceslink">SERVICES</a></li> <li><a href="#" id="featureslink">FEATURES</a></li> <li><a href="#" id="aboutlink">ABOUT</a></li> {else} <!-- If they are on any other page, then show these menu links --> <li><a href="index.php">SECURELIVE</a></li> <li><a href="plans">PLANS & PRICING</a></li> <li><a href="service">SERVICES</a></li> <li><a href="features">FEATURES</a></li> <li><a href="about">ABOUT</a></li> {/if} <!-- End the different menus --> {if $loggedin} <!-- If they are logged in, then show these --> {if $condlinks.affiliates} <!-- If the affiliates option is enabled then show this --> <li><a href="affiliates.php">{$LANG.affiliatestitle}</a></li> {/if} <!-- End the affiliates option --> <li><a href="clientarea.php">MY ACCOUNT</a></li> {if $filename eq "index"}<li><a href="submitticket.php">{$LANG.navopenticket}</a></li>{/if} <li><a href="logout.php">{$LANG.logouttitle}</a></li> {else} <!-- If they are not logged in, then show this --> <li><a href="clientarea.php" class="button no-margin">LOG IN</a></li> {/if} <!-- End the remaining menus --> If you don't want to show the log out link, then you can also do this: {if $loggedin} {else} <li><a href="clientarea.php" class="button no-margin">LOG IN</a></li> {/if} Hope that helps ya, Jeff 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.