upalm Posted January 16, 2020 Share Posted January 16, 2020 (edited) Hi, Before we used to use the function though js to hide the menu's in 'pwreset' and now it does not seem to be working as WHMCS 7.8 and above is using the index file instead of the old 'pwreset'. I tried hiding it through the index filename but that seems to be breaking the styles on the pages without the '.php' extension and it is just showing only the text instead. Here is the code we were using: {if $formaction == 'dologin.php' || $filename == 'pwreset' || $filename == 'register' || $filename == 'login' || $filename == 'clientarea' && !$loggedin} Can anyone help me around this as converting it to a normal page without hiding the menus works perfectly but I really do not want the non logged in users to see the inside content without signing up. Edited January 16, 2020 by upalm 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted January 16, 2020 Share Posted January 16, 2020 You can use $templatefile instead. That way you can target the specific .tpl files. You can target them all with this: {if $templatefile|strpos:"password-reset"===0} <p>Shown on Password Reset pages</p> {/if} 1 Quote Link to comment Share on other sites More sharing options...
upalm Posted January 16, 2020 Author Share Posted January 16, 2020 42 minutes ago, DennisHermannsen said: You can use $templatefile instead. That way you can target the specific .tpl files. You can target them all with this: {if $templatefile|strpos:"password-reset"===0} <p>Shown on Password Reset pages</p> {/if} Wow! That just did the trick. Thank you so much for the help and support 🙂 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.