Jump to content
cseamiya

SIdebar to Remove & Show in Clientarea

Recommended Posts

Hi Everyone,

i want to show sidebar in client area section but not to guest user who just visit in my page.

please suggest me how to do it.

 

image reference:

want to show this in clientarea product details : https://ibb.co/tYfbm8n

don't want to show to any user i want to show my full width of product: https://ibb.co/JrpjmNw

Share this post


Link to post
Share on other sites
24 minutes ago, cseamiya said:

please suggest me how to do it.

as per the previous time you asked - you either remove the sidebars with a hook AND edit the template to adjust the width; or you just edit the orderform templates to hide the cart sidebars when not logged in and adjust the width.

Share this post


Link to post
Share on other sites

Hi Brian,

before i just made change in six template all.min.css file. 

.col-md-3 {
        width: 25%;
        display:none;

 

and in .col-md-9 {

width:100%;

and all the side has been removed. 

but now i want to only show the sidebar in client area section.

so now if i change this css code to default nothing is changed. sidebars are not showing. and when i inspect it it show .col-md-9 100% and .colo-md-3 25% with display:none.

how can i reset it or fix it like before.

Share this post


Link to post
Share on other sites
1 hour ago, cseamiya said:

before i just made change in six template all.min.css file

is that what I suggested that you do? No... if I knew of a quick css fix, then I would have suggested it - AFAIK, there isn't one. headshake.gif

1 hour ago, cseamiya said:

and all the side has been removed.

it was lazy and insane to think that would work... col-md-3 is used in more places than just the orderforms (and often has nothing to do with sidebars), so what you have done will have negative consequences throughout your site.

1 hour ago, cseamiya said:

but now i want to only show the sidebar in client area section.

but you can't with your solution - the div used by the sidebars is now hidden.... at absolute best going down this road, you'd have to use a hook to determine when a client isn't logged in and then selectively adjust the css - but that's just plain stupid.

1 hour ago, cseamiya said:

so now if i change this css code to default nothing is changed. sidebars are not showing. and when i inspect it it show .col-md-9 100% and .colo-md-3 25% with display:none.

firstly, you shouldn't have been editing all.min.css - any css changes should have been added to custom.css and not to any default css file.

secondly, get the original all.min.css for your installed version from the original download zip and reupload it - that will get you back to square one... then you can work through the template and/or hook changes that I have previously suggested.

it wouldn't be difficult to remove all sidebars for non-logged in clients, but as I have said previously (many times to you it feels like), in order to change the cart, you will HAVE to edit the orderform templates.

Share this post


Link to post
Share on other sites

sorry for that, but now when i upload previous all.min.css to current which is in site, after that nothing happen. any solution. we are using version: 7.4.3

Share this post


Link to post
Share on other sites
Just now, cseamiya said:

sorry for that, but now when i upload previous all.min.css to current which is in site, after that nothing happen. any solution. we are using version: 7.4.3

nothing happen means what - there is no change at all ? is the template cached in the browser? are you using cloudflare ??

Share this post


Link to post
Share on other sites
11 minutes ago, cseamiya said:

yes we are using cloudflare! is there any problem?

chances are your site is cached with them - so it might take a few hours before you see it working as you want.

Share this post


Link to post
Share on other sites

If you want to see the changes immediately, you can either clear cache from cloudflare or activate Developer Mode in cloudflare settings. 

Share this post


Link to post
Share on other sites
On 5/12/2018 at 2:52 AM, WHMCS Sachin said:

If you want to see the changes immediately, you can either clear cache from cloudflare or activate Developer Mode in cloudflare settings. 

It's been 1and 1/2 days , i changed to default all.min.css. but till now style of site is not changing, side bar is not showing. how many time cloudflare take.?

Share this post


Link to post
Share on other sites

Thank you, it's changed now, but if i want to change in client area. i don't want to show sidebari in clientarea.php after login.

Share this post


Link to post
Share on other sites

i'm supposed to be on holiday! 🎄

3 hours ago, cseamiya said:

i want to change in client area. i don't want to show sidebar in clientarea.php after login.

then just remove them with a hook - once removed, the page width will adjust... I think nearly all of the sidebars in the client area have unique names, so you shouldn't particularly need to check that they're clients before removing them because only clients can get into the clientarea pages where these sidebars are.. though even if you do, there are plenty of navigation hook examples of checking if a client is logged in posted in the community... though generally speaking, they're only really relevant when you want to hide/show a sidebar to one group (clients / non clients) that is available to everyone, e.g knowledgebase / announcements sidebars etc.

1 hour ago, cseamiya said:

and how can i move these sidebar to below the page.

the short answer is that you cannot... long answer is that you theoretically possibly can, but only with an extraordinary amount of coding that I wouldn't bother to try to code even if wasn't near Christmas - and not even for money!

the real answer is that you're going to have to recreate the links in the appropriate template - basically, those sidebars are just links and there's nothing special about them, *except* that most of them are conditional - so cpanel/webmaill links appear on cpanel products; upgrade/downgrade only appears if the product is upgradeable; up/down options only shows in the configurable options are upgradeable; cancel link only shown if enabled in general settings etc.

to answer a question before you even ask it - "are these conditions publicly listed anywhere?" - the answer is no, you'll have to figure them out yourself... welcome to WHMCS. 🙂

that page from your screenshot is basically covered by at least two templates - clientareaproductdetails.tpl is generally used if it's a non-cpanel product; if it's a cpanel product, that will use /modules/servers/cpanel/templates/overview.tpl - there will be enough Smarty variables available to the overview template to recreate the conditions (and i've just doubled-checked, so I know that for a fact!)... so then it's just a case of editing the template and creating the appropriate output, e.g I don't suppose you would recreate the look of the sidebars, just accommodate the links in their own table/div etc... so you're just looking at using a lot of if statements to check various conditions, and if true, show that link/info.

if you're going to start modifying overview.tpl, then read the link below about adding a custom version to your template...

https://docs.whmcs.com/Working_with_Module_Templates

3-animated-santa-claus.gif

Share this post


Link to post
Share on other sites
19 hours ago, brian! said:

then just remove them with a hook - once removed, the page width will adjust... I think nearly all of the sidebars in the client area have unique names, so you shouldn't particularly need to check that they're clients before removing them because only clients can get into the clientarea pages where these sidebars are.. though even if you do, there are plenty of navigation hook examples of checking if a client is logged in posted in the community... though generally speaking, they're only really relevant when you want to hide/show a sidebar to one group (clients / non clients) that is available to everyone, e.g knowledgebase / announcements sidebars etc.

22 hours ago, cseamiya said:

Thank you, but i create a hook and in that that support sidebar in knowledge base is hide but for the upper sidebar name is Categories is not removing. i already check with use of menu item name. but it's not hiding. any solution and same for announcement page by month sidebar

Share this post


Link to post
Share on other sites
1 hour ago, cseamiya said:

got it, its primary sidebar. Thanks

the source code will always tell you whether it's a primary or secondary sidebar - worst case, it's only a choice to two, so if one doesn't work, try the other.

t18m9jB.png

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines