Custom link in site action menu of sharepoint

In this article I will describe that how to add custom link on site action menu.

Requirement:-

Some time we require to add custom link on site action menu which redirect to our own custom page.
To do so we no need to write any custom c# code. It’s all xml file.

Detail:-

Create your usual WSP solution. Now I will create to below 2 xml file which will display custom link in site action menu.

1. feature.xml
here you can target your other “ElementManifest” but as per my example i will write only one entry for site action menu. See below:-

1
2
3
4
5
6
7
8
9
10
11
12
13
<Feature Id="write feature id here"
	Title="CustomSiteActionMenu"
	Description="Provides Custom Site Action Menu."
	Version="12.0.0.0"
	Hidden="FALSE"
	Scope="Site"
	DefaultResourceFile="core"
	xmlns="http://schemas.microsoft.com/sharepoint/">
	<ElementManifests>
		<ElementManifest Location="SiteActionElements.xml" /> <!– Adding link in Site Action menu –>
		<!– you can add other ElementManifest if you require. like for pagelayout contenttype etc.–>
	</ElementManifests>
</Feature>

2. SiteActionMenu.xml
This file has detail to mention about custom action. See below:-

1
2
3
4
5
6
7
8
9
10
11
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <CustomAction Id="81D16CC8-94E6-480c-8223-C3603FBA69B7"
	GroupId = "SiteActions"
	Location="Microsoft.SharePoint.StandardMenu"
	Sequence="1000"
	Title="Custom action"
	Rights="BrowseDirectories,ViewPages,BrowseUserInfo,UseRemoteAPIs,UseClientIntegration,Open,EditMyUserInfo,CreateSSCSite"
	Description="Create Custom action.">
	<UrlAction Url="~site/_layouts/ABCPage.aspx"/>
  </CustomAction>
</Elements>

For detail on various custom menu in sharepoint please visit my below article:-
http://sharepoint.infoyen.com/2012/04/22/custom-action-menu-in-sharepoint/
Above link explain about
that how to add
custom link on site action menu,
List Action menu,
Site Setting page,
Document library toolbar new menu,
Document library action menu,
per item drop down.

Hope it helps.

Thanks!
Avinash

calendarMarch 14, 2012 · cardInfoyen · commentsNo Comments
tagTags: , , , , ,  · Posted in: Branding, MOSS, SharePoint

Leave a Reply

Spam Protection: , required

myworldmaps infoyen