Jump to content

How to remove the side menu here


BAJI26

Recommended Posts

the above hook should get rid of it.

 

if you're saying that there is a duplicate and the hook is only removing one of the sidebars, then it sounds similar to the issue in the thread below...

 

http://forum.whmcs.com/showthread.php?106562-Double-Side-Menu-during-cart-process

 

which was caused by using a site template designed for v6, with v6.1 order-form templates - and a conflict between the two.

 

if that's what you're seeing, then updating to main theme template to v6.1.1 should solve it... e.g if you don't see the issue with the "Six" theme, but do with your custom theme, then your custom theme needs updating.

 

if you want to edit templates, you could try the thread below...

 

http://forum.whmcs.com/showthread.php?106435-how-to-remove-the-left-column-in-some-page-whmcs-6-1

Link to comment
Share on other sites

Both header and footer has the new sidebar code:

 

In header.tpl change:

 

{if $primarySidebar->hasChildren() || $secondarySidebar->hasChildren()}

 

To:

 

{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}

 

 

And

 

 

       <div class="{if $primarySidebar->hasChildren() || $secondarySidebar->hasChildren()}col-md-9 pull-md-right{else}col-xs-12{/if} main-content">

 

 

To:

 

       <div class="{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}col-md-9 pull-md-right{else}col-xs-12{/if} main-content">

 

 

In footer.tpl

 

 

Replace:

 

{if $secondarySidebar->hasChildren()}

 

 

With:

 

{if !$inShoppingCart && $secondarySidebar->hasChildren()}

Edited by BAJI26
Link to comment
Share on other sites

Both header and footer has the new sidebar code:

 

In header.tpl change:

 

{if $primarySidebar->hasChildren() || $secondarySidebar->hasChildren()}

 

To:

 

{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}

 

 

And

 

 

       <div class="{if $primarySidebar->hasChildren() || $secondarySidebar->hasChildren()}col-md-9 pull-md-right{else}col-xs-12{/if} main-content">

 

 

To:

 

       <div class="{if !$inShoppingCart && ($primarySidebar->hasChildren() || $secondarySidebar->hasChildren())}col-md-9 pull-md-right{else}col-xs-12{/if} main-content">

 

 

In footer.tpl

 

 

Replace:

 

{if $secondarySidebar->hasChildren()}

 

 

With:

 

{if !$inShoppingCart && $secondarySidebar->hasChildren()}

 

 

I think doing it like this in the tpl files is a better more flexible and less error prone way compared to hooks unless you are sure you want to do it globally for all situations and all templates. This is how we remove the sidebar from certain pages and dependent on whether the client is logged in or not.

 

Unless someone can show me a relatively easy way to do it with hooks that target specific pages and templates and dependent on whether the client is logged in or not then I will continue to believe that the Smarty way in tpl files is the best way.

Edited by mustardman
Link to comment
Share on other sites

Unless someone can show me a relatively easy way to do it with hooks that target specific pages and templates and dependent on whether the client is logged in or not then I will continue to believe that the Smarty way in tpl files is the best way.

there are a number of examples posted by sentq and myself that specify changes to occur only on certain pages and whether the client is logged in or not...

 

the advantage of hooks is that once added, they should continue to work during WHMCS updates... if you modify the templates, you'll need to manually check for template changes during updates..

 

but there's no right or wrong way - it's whichever you feel most comfortable using, and more importantly, which one works for your needs.

Edited by brian!
Link to comment
Share on other sites

as brian said, if you need to implement something or have any kind of issues with customization etc, there will be way or more to fix/implement it, you decide what is better for your needs after all.

 

Hooks is more stable, i know people doing a lot of customization in their templates, then the update time is come and all the headache started, as what happened to the OP here.

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