Wednesday, January 21, 2009

Edit the welcome-dropdown menu

If you want to remove the "MySettings" from the user dropdown menu (up in the right corner of a sharepoint page) so that it looks like this instead:

Then go to folder:C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES
Make a copy of welcome.ascx!
Then open the file Welcome.ascx in Notepad
Add the following attribute to each element you wish to hide:Visible="False"
For example:

SharePoint:MenuItemTemplate runat="server" id="ID_PersonalInformation"
Description="(%$Resources:wss,personalactions_personalinformationdescription%)" MenuGroupId="100"



Anonymous said...

Problem with this approach is that it will apply to ALL sites and ALL site collections and ALL web apps in your SharePoint environment - not only one desired page/site.

I would recommend doing a feature and perhaps look at overriding some CustomAction.. ;-)

Zorro is cool.

Lise said...

Heeee hey Tobbe Z :=)
I know, it's a quick and really dirty solution hihi.
Back to work man...

eli said...

Hey Not sure if you still checking responses to this post but i was curious if you new how to add a link to the welcome menu instead of removing one? thanks.

Lise said...

Hi Eli,

Here is an example of how to add your own links in the welcome.ascx file. You should really build a custom feature like in the example so that your customizations are intact if there is an upgrade or similar.
Good luck :)

Phoenix said...

Hello Lise, do you know of a way to edit this menu without editing the Welcome.ascx file, I found this article but could not get it to work for me thanks:!8040CC624DDC5404!624.entry


RyanTMann said...

There is a pretty easy way to do this without having it affect the whole farm.

Go to the control templates directory and make a new folder for your site,

e.g. SomeSite

Now go back to control templates and copy welcome.aspx and paste it into your new folder "SomeSite".

Then for each web application you want to use the new welcome.aspx, edit the master page files in sharepoint designer, locate the following line,

<%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %>

Change that to

<%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/SomeSite/Welcome.ascx" %>

Now the welcome control will load the copy aspx source instead of the original. Proceeed to modify as mentioned in this blow without affecting the whole farm.

RyanTMann said...

Oh, forgot to mention. With Visual Studio 2010 you can add an Application Page to a SharePoint assembly project. It will automatically map it to layouts directory/Namespace.Assembly directory. Simply right click the directory in solution explorer and remap it to the control templates directory.

Now when you deploy your solution it will automatically put your welcome page in the right place.

Nice to be able to package everything in one solution, hit deploy at a new location and watch everything go where it needs to and run out of the box.

Lise said...

Thanks Ryan for sharing, great info!
Take care,

cory church said...

I want to remove the word "Welcome" at the very top. How do I do that?