clasil Posted September 28, 2015 Share Posted September 28, 2015 Hi guys, how can we remove the left column from some page whmcs 6.1 screencast.com/t/qE1OsSCv3OY i just need to know what to comment out .. form the template pages . Thanks CS 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 28, 2015 Share Posted September 28, 2015 here is how http://docs.whmcs.com/Client_Area_Sidebars_Cheatsheet#Hiding.2FRemoving_a_Sidebar_Menu_Item 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 28, 2015 Share Posted September 28, 2015 generally speaking, sentq's suggestion is correct - removal of sidebars is best done using hooks. however, I think with standard cart, removal via hooks is pointless - it just leaves a gap on the left column. I think you'll need to modify each template file within that folder that calls the sidebars template... e.g with products.tpl, change line 7 from... <div class="pull-md-right col-md-9"> to.. <div class="pull-md-right col-md-12"> remove the div block at line 28... <div class="col-md-3 pull-md-left sidebar hidden-xs hidden-sm"> {include file="orderforms/standard_cart/sidebar-categories.tpl"} </div> and then at line 32, change the div and remove the include... <div class="col-md-12 pull-md-right"> .. and then make similar changes to the other templates. you may also wish to rename the order-form template folder so make sure you don't overwrite your changes during a WHMCS update. 0 Quote Link to comment Share on other sites More sharing options...
clasil Posted September 28, 2015 Author Share Posted September 28, 2015 HI Brian, thansk for taking the time in checking this for me but i don't see this lines you mention in my template clientarea/templates/orderforms/premium_comparison/products.tpl thanks Cs 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 28, 2015 Share Posted September 28, 2015 Hi CS, you never said you were using Premium Comparison! however, the answer still stands - just ignore what I said previously about modifying products.tpl. in PC, that's just the opening page and the sidebars are hidden via a button - if you wanted to remove the button and sidebars from this page, you could edit premium_comparison/products.tpl and remove the {if} block @ line 18 and the div block @ line 26. for the other pages, you will need to modify the templates in "standard_cart", e.g if your hosting product requires a domain, the second page you'll see is standard_cart/configureproductdomain.tpl - follow my instructions from the previous post for products.tpl - the line numbers will be different, but the code should be common to the other templates. change line 7; remove the div block at line 15; change line 21 from md-9 to md-12 and remove the include beneath it. and then work your way through the other templates in that folder that use the includes to the sidebar. if you're going to make significant changes such as this, you might want to duplicate the standard_cart folder and edit the copy instead, and then in premium_comparison/theme.yaml and edit the file by replacing "standard_cart" with the new name of your folder.. config: parent: standard_cart but if you do this, test the cart thoroughly to ensure that it still works correctly. 0 Quote Link to comment Share on other sites More sharing options...
Guest vuzuggu Posted September 30, 2015 Share Posted September 30, 2015 I am trying to remove the left side menu on the Knowledgebase pages. The code I am using is: <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $primarySidebar->removeChild('Support'); }); Firstly, is this code correct? Secondly, where do I put the code? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 30, 2015 Share Posted September 30, 2015 you should probably have started a new thread about this! Firstly, is this code correct? Secondly, where do I put the code? no, the code is incorrect - if you want to remove the support sidebar and/or tag cloud, use the following code... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Support Knowledgebase Tag Cloud'))) { $secondarySidebar->removeChild('Support Knowledgebase Tag Cloud'); } if (!is_null($secondarySidebar->getChild('Support'))) { $secondarySidebar->removeChild('Support'); } }); if you remove both of them, the knowledgebase pages will adjust their width to fit. create a new file in the includes/hooks/ folder and call it 'kbsidebar.php' and paste the above code into it - then when you refresh the knowledgebase page, the sidebars should be removed. 0 Quote Link to comment Share on other sites More sharing options...
Guest vuzuggu Posted September 30, 2015 Share Posted September 30, 2015 Thank you very much! Really appreciate it. 0 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 29, 2015 Share Posted October 29, 2015 (edited) Hello brian, thanks for your instructions however even if I have removed the {if} block @ line 18 and the div block @ line 26 of templates/orderforms/premium_comparison/products.tpl the look of my cart.php page is still the same: awesomescreenshot.com/07b5d1879d Edited October 29, 2015 by Guest Please Attach Images to Your Posts. 0 Quote Link to comment Share on other sites More sharing options...
satsuke Posted April 10, 2016 Share Posted April 10, 2016 How to remove Parent and Child sidebar at all? its very confusing.. 0 Quote Link to comment Share on other sites More sharing options...
satsuke Posted April 10, 2016 Share Posted April 10, 2016 I just want to remove Already Registered Menu on Client Register Templates. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 10, 2016 Share Posted April 10, 2016 I just want to remove Already Registered Menu on Client Register Templates. can you add a screenshot so I know exactly what you want to remove... 0 Quote Link to comment Share on other sites More sharing options...
satsuke Posted April 11, 2016 Share Posted April 11, 2016 can you add a screenshot so I know exactly what you want to remove... http://prntscr.com/aqpm7d I've tried to remove it but I got blank page on domainchecker.php.. (edited template clientregister.php) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 11, 2016 Share Posted April 11, 2016 there's no need to edit the template for this, a simple action hook will remove it and not affect other pages... so create a file in includes/hooks, give it a filename (e.g alreadyregistered.php) and paste the following code into it... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Already Registered'))) { $primarySidebar->removeChild('Already Registered'); } }); there is another sidebar shown on the register page, though not on your screenshot, about security questions - if you want to remove them both, then you can use... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Already Registered'))) { $primarySidebar->removeChild('Already Registered'); } }); add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Why Security Questions'))) { $secondarySidebar->removeChild('Why Security Questions'); } }); with these sidebar(s) removed, the page will adjust and be shown full width. 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.