snofire Posted February 14, 2019 Share Posted February 14, 2019 Hello everyone. I'm very new to WHCMS so trying to do as much research as I can but need some assistance on this. On the main page before a user logs in at the homepage there are menu options up top that I want to Hide. Everything I'm finding as a hook pertains to being in the client area. Also side question on where do we find the main page php to modify any words or anything (ie. What would you like to do today?) 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted February 15, 2019 Share Posted February 15, 2019 (edited) Go to "header.tpl" in your template folder. Put {if $loggedin} tag before <nav> (check here) and close the tag properly (line 134) This will hide all the nav bar. If you want to hide only the line, but keep the blue nav bar as it is, put the tag in line 120 (before the include file) Edited February 15, 2019 by pRieStaKos 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 15, 2019 Share Posted February 15, 2019 17 hours ago, snofire said: On the main page before a user logs in at the homepage there are menu options up top that I want to Hide. Everything I'm finding as a hook pertains to being in the client area. the "client area" is basically everything that a user can see from their front-end... they may be a client, or just a new visitor to your site and it includes the opening pages, the cart and all the client-only pages that can be seen when a user logs in. the action hook equivalent of what @pRieStaKos suggests with his template edit, would be to hide by navbar using css if the user is not logged in... <?php # Hide Navbar If User Not Logged In Hook # Written by brian! function hide_navbar_hook($vars) { $client = Menu::context('client'); if (!$client) { $csscode = "<style>#main-menu { display: none; }</style>"; return $csscode; } } add_hook("ClientAreaFooterOutput", 1, "hide_navbar_hook"); or using JavaScript... <?php # Hide Navbar If User Not Logged In Hook # Written by brian! function hide_navbar_hook($vars) { $client = Menu::context('client'); if (!$client) { $csscode = "<script> $(function() { $('#main-menu').remove(); }); </script>"; return $csscode; } } add_hook("ClientAreaFooterOutput", 1, "hide_navbar_hook"); 17 hours ago, snofire said: Also side question on where do we find the main page php to modify any words or anything (ie. What would you like to do today?) if you just want to change the text, then you can use the Language Overrides feature and modify the strings for each language that you wish to change. 1 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted February 15, 2019 Share Posted February 15, 2019 @brian! I was sure that you would come up with a hook 😂 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 15, 2019 Share Posted February 15, 2019 1 hour ago, pRieStaKos said: I was sure that you would come up with a hook lol - it only occurred to me this morning when I realised it had it's own css ID. 🙂 0 Quote Link to comment Share on other sites More sharing options...
snofire Posted February 15, 2019 Author Share Posted February 15, 2019 Thank you guys!! I was able to modify what you stated. 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.