tigerstripemedia Posted November 16, 2018 Share Posted November 16, 2018 Hi there, I am wanting to hide the WHMCS navbar from users if they are not logged in. I want to hide the full navbar and not just an item. I know I need to use a hook however I am not sure what hook and which file to include it in. Attached is an image of my navbar with an arrow to the section I want to hide. I believe this is called the Primary Navbar? It is the bottom nav out of the two anyway! Thanks for any help. - Hayden 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 18, 2018 Share Posted November 18, 2018 Hi Hayden, On 16/11/2018 at 12:38, tigerstripemedia said: I am wanting to hide the WHMCS navbar from users if they are not logged in. I want to hide the full navbar and not just an item. I know I need to use a hook however I am not sure what hook and which file to include it in. I assume that you've solved already this as i'm not seeing it on your site... On 16/11/2018 at 12:38, tigerstripemedia said: Attached is an image of my navbar with an arrow to the section I want to hide. I believe this is called the Primary Navbar? It is the bottom nav out of the two anyway! primary navbar on the left (Portal Home), secondary navbar (Account) on the right... and then it comes down to what you mean by hiding... just removing the links from the primary navbar? do the same for the secondary ?? hide the entire bar ??? the answer to those would tell you how to do it... first two would be hooks; third could be done by a variety of methods. 0 Quote Link to comment Share on other sites More sharing options...
tigerstripemedia Posted November 18, 2018 Author Share Posted November 18, 2018 Hi Brian, Thanks for replying. Yes I managed to resolve it, sorry I forgot to come and update this. Thanks also for pointing out the typo on my coming soon page. Corrected that now. I wanted to hide the entire bar when the user is logged out. I now have a link to login and a link to view the cart in the very top navigation bar and then the second navbar appears when users login. Please see screenshots attached. Works perfectly however I am not sure I did the the "correct" way. I added an if statement to my header.tpl file within my custom template: {if $loggedin} <section id="main-menu"> Content goes here </section> {/if} If there is a better way of doing this, suggestions would be welcome! Thanks, Hayden 1 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted November 19, 2018 Share Posted November 19, 2018 Thanks for sharing the fix @tigerstripemedia 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 19, 2018 Share Posted November 19, 2018 On 18/11/2018 at 12:02, tigerstripemedia said: If there is a better way of doing this, suggestions would be welcome! your way is the way that I would have done it... whether that means it's the "correct" way I don't know, but it's the simplest method that will achieve the desired outcome. 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.