If you want to extend the welcome menu on SharePoint (the one that states your name on the top right corner and drops down options like “My Settings”, and “Sign Out”). I will show you step by step on how to do that in SharePoint Foundation 2010, this also works in older versions of SharePoint. So let’s start.
1. Create an Empty SharePoint Project
Create an empty SharePoint project in visual studio 2010
2. Updating the Solution Feature
Now Double-click Feature1 under feature section of project and update the properties, make sure you change the scope to “Web Application“.
3. Create an Element
Now you need to create an element to attach to your feature, to do that right-click on the project and add a new item, then choose “Empty Element“. Give it a proper name.
Now edit your element file to reflect what you needed (The additional menu item on the drop down menu), here is a sample code to create a “More Information” link which goes to a page in SharePoint called “/SitePages/MoreInformation.aspx”
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id ="CustomMenu_MoreInformation" GroupId="PersonalActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="1000" Title="More Information" Description="View more information" ImageUrl="_layouts/ebloginImages/logo.png"> <UrlAction Url="/SitePages/MoreInformation.aspx"/> </CustomAction> </Elements>
4. Package your SharePoint Solution
Once you edit the element file, all you need to do now is to package it. Right click on the Project or on the Menu bar Choose Build->Package.
5. Add and Install your Solution to SharePoint
Copy your packaged file (.wsp) to SharePoint server and install it using stsadm or PowerShell.
The “More information” element is added to the welcome page as you can see in the picture.
Comments are closed.