Remove left- side bar

Hai i need to remove left side bar(screen attached),is this possible?

1 Like

Hi,

AFAIK it cannot be hidden using standard customization/configuration features.

Basically can be removed, but the result will be ugly


@ganesh

you can hide whole left side toolbar. Open Doctype at the bottom there is option Hide Toolbar , just check it and reload the form.

3 Likes

Hi @Sangram,

What is I want to hide specific components of the left side toolbar?

For example, I want to hide all components below “Shared With”.

Thanks!

@mulyadi-agtechsg

There is no such provision to hide specific components for now.

1 Like

Hi,

Is there any option to hide the entire left sidebar?

If so, please let me know how to do it

In your doctype, there is one checkbox to hide toolbar

image

This side section can not hide
If you want to hide it you can use CSS
try to write this in desk.css

.layout-side-section{
	display: none;
}

This is your result

To improve it add this style also in desk.css

.layout-main-section-wrapper{
width:100%
}

This is your result

2 Likes

@ganesh Hi!

In .js file of your doctype:

frappe.ui.form.on("[Your Doctype]", {    
refresh: function(me) {
    		me.page.sidebar.remove(); // this removes the sidebar
    		me.page.wrapper.find(".layout-main-section-wrapper").removeClass("col-md-10"); // this removes class "col-md-10" from content block, which sets width to 83%
    	} 
}

P.S. But this is possible on self-hosted version

I’am trying to remove the timeline (comment section) along with the sidebar… i have tried this But no luck

 frappe.ui.form.on("Opportunity Pipeline", {    
 refresh: function(me) {
		me.page.sidebar.remove(); // this removes the sidebar
		me.page.wrapper.find(".timeline").removeClass(".timeline");
	    } 
}
);

Iam using this for hiding side bar if the user have specific role, but i also want to remove the comment section along with the sidebar

frappe.ui.form.on("Opportunity Pipeline", {  
 onload: function(me){
 cur_frm.save();
        },
      refresh: function(me){


if(frappe.user.has_role("Employee")){ 		



     	}  
 else{
 me.page.sidebar.remove();
}

}
}
);
1 Like

@Sangram
Hi ,
i want to hide toolbar of custom doctype which is submittable for this i tick the option hide toolbr. But it throws following error
Cannot read property ‘comment_area’ of undefined

@asd

Check your doctype fields, whether you have added proper field types and options.