Tuesday, March 31, 2009

How to remove "My Settings" and "Personalize this page" menu items from the "Welcome" menu

You will sometimes want to hide certain menu items from the "Welcome" menu in the SharePoint site.
You can do the following:
1. Go to the following folder at the MOSS server:C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES
2. Open file Welcome.ascx in the editor
3. There are more elements. For all those you don't want to display to the users, add the attribute:Visible="False"
For example:

Text="<%$Resources:wss,personalactions_personalinformation%>"
Description="<%$Resources:wss,personalactions_personalinformationdescription%>"
MenuGroupId="100"
Sequence="100"
ImageUrl="/_layouts/images/menuprofile.gif"
UseShortId="true"
Visible="False" />
This will hide "MySettings" menu.
WARNING: this is shared file on the Farm-level, so it means, if you do this, the items will not be visible at any SP site on your farm.
And, yes, of course, on the similar way you can add custom menu items under welcome. Just use the attribute
ClientOnClickNavigateUrl="BLOCKED SCRIPT..."
You can define JavaScript function to jump to the custom page or just use Window.Location() to write destination inline.

No comments: