Mandalorian Posted January 23, 2021 Share Posted January 23, 2021 Hi Gents, I tried changing {$WEB_ROOT}/index.php to my own URL in the header.tpl on the new Twenty-One theme but the URL remains unchanged. Any idea how to change the URL of the Header Logo please? 0 Quote Link to comment Share on other sites More sharing options...
AALayer Posted January 23, 2021 Share Posted January 23, 2021 Are you modifying /header.tpl right? Make sure you have cleared your caches [server/locally] and try again. 0 Quote Link to comment Share on other sites More sharing options...
Mandalorian Posted January 23, 2021 Author Share Posted January 23, 2021 23 minutes ago, AALayer said: Are you modifying /header.tpl right? Make sure you have cleared your caches [server/locally] and try again. Thanks for replying. This is the code I modified in header.tpl. <div class="container"> <a class="navbar-brand mr-3" href="{$WEB_ROOT}/index.php"> {if $assetLogoPath} <img src="{$assetLogoPath}" alt="{$companyname}" class="logo-img"> {else} {$companyname} {/if} </a> I changed "{$WEB_ROOT}/index.php to my own URL. Cleared the cache too, but no luck. Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
Mandalorian Posted January 23, 2021 Author Share Posted January 23, 2021 It works fine. I had just forgotten to change the theme from Six to Twenty-One. 😅 0 Quote Link to comment Share on other sites More sharing options...
AALayer Posted January 24, 2021 Share Posted January 24, 2021 Great that you solved it mate! 1 Quote Link to comment Share on other sites More sharing options...
Damo Posted January 24, 2021 Share Posted January 24, 2021 Instead of modifying the template you should create a child template. That way your changes won't get overwritten when an update comes out for Twenty One. 1 Quote Link to comment Share on other sites More sharing options...
Mandalorian Posted January 24, 2021 Author Share Posted January 24, 2021 (edited) 11 hours ago, AALayer said: Great that you solved it mate! Cheers, @AALayer Stay safe! Edited January 24, 2021 by Mandalorian 0 Quote Link to comment Share on other sites More sharing options...
Mandalorian Posted January 24, 2021 Author Share Posted January 24, 2021 9 hours ago, Damo said: Instead of modifying the template you should create a child template. That way your changes won't get overwritten when an update comes out for Twenty One. That's good advice, @Damo Thank you 🙂 For now I had to revert to SIX. Will use a child template as per the link you shared, as soon Twenty-One template's design issues are fixed by whmcs. Waiting for a 8.1 maintenance release with bug fixes. Be well! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 24, 2021 Share Posted January 24, 2021 16 hours ago, Mandalorian said: Any idea how to change the URL of the Header Logo please? you can use a hook to modify the URL. the above would only work for Six and related themes, not 21 - though 21 hadn't even been released in beta when I wrote that hook code. 🤪 if you want to tweak it for 21 (or a child of 21)... <?php # Change Logo URL in Twenty-One Hook # Written by brian! function change_logo_url_hook($vars) { return "<script> $(function(){ $('a.navbar-brand').attr({href:'https://www.google.com',target:'_blank'}); }); </script>"; } add_hook("ClientAreaFooterOutput", 1, "change_logo_url_hook"); .. and for the 1,545th time, can I complain about WHMCS not adding proper unique IDs to their elements - it would make like so much easier if they did. 1 Quote Link to comment Share on other sites More sharing options...
Mandalorian Posted January 24, 2021 Author Share Posted January 24, 2021 (edited) 3 hours ago, brian! said: you can use a hook to modify the URL. the above would only work for Six and related themes, not 21 - though 21 hadn't even been released in beta when I wrote that hook code. 🤪 if you want to tweak it for 21 (or a child of 21)... <?php # Change Logo URL in Twenty-One Hook # Written by brian! function change_logo_url_hook($vars) { return "<script> $(function(){ $('a.navbar-brand').attr({href:'https://www.google.com',target:'_blank'}); }); </script>"; } add_hook("ClientAreaFooterOutput", 1, "change_logo_url_hook"); .. and for the 1,545th time, can I complain about WHMCS not adding proper unique IDs to their elements - it would make like so much easier if they did. Ah cheers, Brian! The knight in the shining armor 🙂 Need your advice. Please see my PM. Edited January 24, 2021 by Mandalorian 0 Quote Link to comment Share on other sites More sharing options...
Mandalorian Posted January 24, 2021 Author Share Posted January 24, 2021 (edited) @brian! You seem to have disabled the direct messages 😔 Edited January 24, 2021 by Mandalorian 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 25, 2021 Share Posted January 25, 2021 23 hours ago, Mandalorian said: @brian! You seem to have disabled the direct messages 😔 not disabled - just a full mailbox... the price I willingly pay for resigning from the pointless GearHead rank many years ago when I got sick of the pathetic intimidation a certain staff member tried to impose... 😎 try sending again. 1 Quote Link to comment Share on other sites More sharing options...
Mandalorian Posted January 25, 2021 Author Share Posted January 25, 2021 19 minutes ago, brian! said: not disabled - just a full mailbox... the price I willingly pay for resigning from the pointless GearHead rank many years ago when I got sick of the pathetic intimidation a certain staff member tried to impose... 😎 try sending again. Cheers, Brian!!! The thing is people trust you and your judgment on all things whmcs. Just inboxed you 😊 Be well, 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.