Hide My Site and My Profile in Sharepoint 2010 with CSS
My current project is in a shared environment, so disabling services and the like in Central Administration is not an option. However, the following code was able to remove the pesky menu options with a minimum of fuss.
The first attempt was to use a blanket css update:
#mp1_0_0_Anchor,#mp1_0_1_Anchor { display: none; }
but we then found that our menu items in a custom girdview control vanished. Bummer. The solution was narrow the scope of the css in order to be very specific for the menu items.
The following code was produced:
.ms-MenuUIUL li[text='My Site'] { display: none;}
.ms-MenuUIUL li[text='My Profile'] { display: none;}
The first attempt was to use a blanket css update:
#mp1_0_0_Anchor,#mp1_0_1_Anchor { display: none; }
but we then found that our menu items in a custom girdview control vanished. Bummer. The solution was narrow the scope of the css in order to be very specific for the menu items.
The following code was produced:
.ms-MenuUIUL li[text='My Site'] { display: none;}
.ms-MenuUIUL li[text='My Profile'] { display: none;}
Comments
Post a Comment