Jump to content

Remove Sidebar


cseamiya

Recommended Posts

12 minutes ago, cseamiya said:

How to remove sidebar left sidebar from whmcs every page.

the usual two ways would be to use a hook or to modify the templates... or a combination of the two.

hooks should work on every page outside of the cart; they'll work in the cart too, but the page width wouldn't adjust for the missing sidebar, so you'd effectively have to edit the cart templates to remove them properly.

 

Link to comment
Share on other sites

10 hours ago, cseamiya said:

it will be fine or it will make problem in future?

I wouldn't recommend (and neither do WHMCS!) editing all.min.css - just add any custom css code to custom.css, and remember to back it up before updating WHMCS.

6 hours ago, WHMCS ChrisD said:

i'd recommend creating a custom theme as any time you upgrade /six/ would be overriden this way you'd not override your customizations.

I think this comes down to how much you are going to customise the templates - personally, if you can do what you want with a combination of hooks/css, then I wouldn't bother creating a custom theme.... whilst upgrading won't override a custom theme, you'd still have to compare the updated code for each template after every update.. so either way, there's no easy ride.

it's simple enough to write a hook to nuke all the sidebars - you don't have to remove them by naming each individually - you'd also need to ensure that the templates contain other paths to those Sidebar links (if required)... especially those used in the client area.

where I might agree with Chris would be to create a custom orderform template (if you're intent on removing the sidebars in there too) - as I said previously, to remove the sidebars from the cart, you're effectively going to have to edit all (most?) of the main cart templates (i'm assuming you're using Standard Cart)....

bm3HZrh.png

gQZqSdP.png

if you wanted to be clever, you could do the following in the standard_cart templates (below is from domainregister, but they're all pretty much the same)...

        <div class="pull-md-right col-md-{if $secondarySidebar|@count gt 0}9{else}12{/if}">

            <div class="header-lined">
                <h1>
                    {$LANG.registerdomain}
                </h1>
            </div>

        </div>
		{if $secondarySidebar|@count gt 0}
        <div class="col-md-3 pull-md-left sidebar hidden-xs hidden-sm">
            {include file="orderforms/standard_cart/sidebar-categories.tpl"}
        </div>
		{/if}

        <div class="col-md-{if $secondarySidebar|@count gt 0}9{else}12{/if} pull-md-right">

... which basically checks the content of the sidebar array - if it contains elements, then it shows the sidebar as normal... if the sidebar array is empty (e.g you've nuked it with a hook), then it adjusts the layout to use the full width (as per Six).

WHMCS should have done that (or something similar) years ago. headshake.gif

Link to comment
Share on other sites

12 hours ago, brian! said:

I wouldn't recommend (and neither do WHMCS!) editing all.min.css - just add any custom css code to custom.css, and remember to back it up before updating WHMCS.

I think this comes down to how much you are going to customise the templates - personally, if you can do what you want with a combination of hooks/css, then I wouldn't bother creating a custom theme.... whilst upgrading won't override a custom theme, you'd still have to compare the updated code for each template after every update.. so either way, there's no easy ride.

it's simple enough to write a hook to nuke all the sidebars - you don't have to remove them by naming each individually - you'd also need to ensure that the templates contain other paths to those Sidebar links (if required)... especially those used in the client area.

where I might agree with Chris would be to create a custom orderform template (if you're intent on removing the sidebars in there too) - as I said previously, to remove the sidebars from the cart, you're effectively going to have to edit all (most?) of the main cart templates (i'm assuming you're using Standard Cart)....

bm3HZrh.png

gQZqSdP.png

if you wanted to be clever, you could do the following in the standard_cart templates (below is from domainregister, but they're all pretty much the same)...


        <div class="pull-md-right col-md-{if $secondarySidebar|@count gt 0}9{else}12{/if}">

            <div class="header-lined">
                <h1>
                    {$LANG.registerdomain}
                </h1>
            </div>

        </div>
		{if $secondarySidebar|@count gt 0}
        <div class="col-md-3 pull-md-left sidebar hidden-xs hidden-sm">
            {include file="orderforms/standard_cart/sidebar-categories.tpl"}
        </div>
		{/if}

        <div class="col-md-{if $secondarySidebar|@count gt 0}9{else}12{/if} pull-md-right">

... which basically checks the content of the sidebar array - if it contains elements, then it shows the sidebar as normal... if the sidebar array is empty (e.g you've nuked it with a hook), then it adjusts the layout to use the full width (as per Six).

WHMCS should have done that (or something similar) years ago. headshake.gif

it's not chnaging

Link to comment
Share on other sites

4 hours ago, cseamiya said:

it's not changing

seriously? you are going to have to give me more info than that if you want help... I wrote it in a clean Six/Standard_cart in v7.6.1; nuked the sidebars with a hook and the display width adjusted; disabled the hook and the cart page showed as normal.

screenshots, links, WHMCS / template / orderform versions, details of hooks used, any css changes still in place (none should be needed for this) etc... throw me a bone for gawd's sake. 🍖

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