ERPNext Conference 2019* ERPNext.com Blog

Remove left- side bar


#1

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


Customize Desk GUI?
#2

Hi,

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


#3

Basically can be removed, but the result will be ugly



#4

@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.


#5

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!


#6

@mulyadi-agtechsg

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


#7

Hi,

Is there any option to hide the entire left sidebar?

If so, please let me know how to do it


#8

In your doctype, there is one checkbox to hide toolbar

image


#9

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


#10

@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


#11

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();
}

}
}
);

#12

@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


#13

@asd

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