Jump to content

Center The Clientarea


Oliver F

Recommended Posts

Hi!

Recently I created several hooks to remove unnecessary sidebar widgets like "categories" and "actions".

For example: 

Quote

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $SecondarySidebar)
{
   if(!is_null($SecondarySidebar->getChild('Actions'))){
               $SecondarySidebar->removeChild('Actions');
   }
}); 

 To remove the Actions.

 

When I have done this my whole client area and order form is not centred, is very much to the right. And if I can minimize the client area gap as well (as shown on the 2nd picture)

How do I center it? (I'm using custom theme) 

whmcs.png

whmcs2.png

Link to comment
Share on other sites

On 19/02/2020 at 11:31, Oliver F said:

Recently I created several hooks to remove unnecessary sidebar widgets like "categories" and "actions".

there has been an issue with Six since it was launched that if you remove those sidebars from the cart, then the page width doesn't auto adjust - because there is a 3/9 split in the divs.

On 19/02/2020 at 11:31, Oliver F said:

When I have done this my whole client area and order form is not centred, is very much to the right. And if I can minimize the client area gap as well (as shown on the 2nd picture)

How do I center it? (I'm using custom theme) 

the above thread outlines how to do it with Six, but i've no idea how far your custom theme has deviated from Six - but hopefully it gives you the basic steps off what might fix it.

btw - if you end up fixing this in the template, then you wouldn't need to use that hook as the sidebars would have been removed from the cart by the template changes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated