Jump to content

SIdebar to Remove & Show in Clientarea


cseamiya

Recommended Posts

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.

Link to comment
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.

Link to comment
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.

Link to comment
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 ??

Link to comment
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.?

Link to comment
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

Link to comment
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

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