MistaMista Posted December 15, 2021 Share Posted December 15, 2021 Hi, I need some help completely removing a sidebar from the client area. I'm using a Hook to remove the sidebar, however I'm always left with this empty div, specifically the <div class="col-mi-3 pull-md-left sidebar">. It ends up looking like this. https://prnt.sc/2359cs7 This is the hook I'm using: add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Ticket List Status Filter'))) { $secondarySidebar->removeChild('Ticket List Status Filter'); } }); Am I doing something wrong with the hook, or is it possibly just an issue in my style-sheet? Thanks 0 Quote Link to comment Share on other sites More sharing options...
MistaMista Posted December 15, 2021 Author Share Posted December 15, 2021 For anyone running into a similar issue I found the solution here: I ended up editing this div in my themes header.tpl file with the code brian! had provided in that post. It now looks like this. {if $templatefile neq "clientareainvoices"} <div class="col-mi{if $secondarySidebar|@count gt 0}9{else}12{/if} pull-md-left sidebar"> {include file="$template/includes/sidebar.tpl" sidebar=$primarySidebar} </div> {/if} This is now having the desired effect of completely removing the empty div and and the remaining content is no longer floating in space over of the right side of the page. 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.