Hide menu item

To hide first element of SiteAction menu:

var siteActionMenuId = 'zz1_SiteActionsMenuMain';
var siteActionMenu = new SPMenu(siteActionMenuId);
siteActionMenu.Items[0].Hidden = true;
siteActionMenu.Update();


To show all elements of SiteAction menu

var siteActionMenuId = 'zz1_SiteActionsMenuMain';
var siteActionMenu = new SPMenu(siteActionMenuId);
for(var i = 0; i < menu.Items.length; i++){
    siteActionMenu.Items[i].Hidden = false;
}
siteActionMenu.Update();

Last edited May 29, 2012 at 8:56 PM by VitalyZhukov, version 2

Comments

No comments yet.