27 February 2011
The Site Actions menu is available on every page inside of SharePoint Foundation. You can add an additional item to this menu using the following custom action. Let’s start J
1. Create an empty SharePoint project in visual studio 2010
2. Now Double-click Feature1 under feature section of project and update the properties, make sure you change the scope to “Web Application“
3. 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 site action drop down menu), here is a sample code to create a “Custom Settings” link which goes to a page in SharePoint called “/SitePages/CustomSettings.aspx”
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="SiteActionsToolbar" GroupId="SiteActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="1000" Title="Custom Settings" Description="Custom site settings" ImageUrl="_layouts/ebloginImages/logo.png"> <UrlAction Url="/SitePages/CustomSettings.aspx"/> </CustomAction> </Elements>
4. 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. Copy your packaged file (.wsp) to SharePoint server and install it using stsadm or PowerShell.
Your site action menu will have a new option as shown in below picture.
Cheap Coach Bags
Thank you for this website. Thats all I can say. You most definitely have made this blog into something thats eye opening and important. You clearly know so much about the subject, youve covered so many bases. Great stuff from this part of the internet. Again, thank you for this website.
cheap sunglasses
Wow! It is as if you understand my thoughts! A person appear to understand so considerably relating to this, like you wrote the book in it or some thing. I believe that you could perform with a few images to drive this content home a bit, on top of that, this really is informative weblog post. The fantastic study. I’ll certainly return.
Bhavya Chhabra
Hi Ulysses,
Nice Post !!
In addition to this one menu item, we can also have fly out menus in the ‘Site Actions’ menu. Here’s the post which describes how this can be done :
http://www.directsharepoint.com/2011/12/creating-custom-fly-out-menu-sharepoint.html