Add navigation link in site settings navigation page SharePoint 2013 using Visual Studio 2013

This SharePoint 2013 tutorial explains, how we can add a navigation link in site settings navigation page SharePoint 2013 using Visual Studio 2013.

Before reading this post, make sure you write my previous post where we have discussed how we can add a custom application page using SharePoint 2013 using visual studio 2013. In that solution, I am adding the rest things here. Before starting this your solution should look like below:

add navigation link in site settings navigation page SharePoint 2013
add navigation link in site settings navigation page SharePoint 2013

You can notice there will be no feature associated with it.

Add navigation link in site settings navigation page SharePoint 2013 using Visual Studio 2013

Now we will add on the empty element to it. For thing, right click on the project then Adds new item… Then from the Add New Item dialog box, choose an Empty Element as shown in the fig below.

add navigation link in site settings navigation page SharePoint 2013 using visual studio
add navigation link in site settings navigation page SharePoint 2013 using visual studio

This will add one Elements.xml. We have to modify the Elements.xml. By default the Elements.xml file looks like below:

<?xml version=”1.0″ encoding=”utf-8″?>
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>
</Elements>

Modify the Element.xml like below:

<?xml version=”1.0″ encoding=”utf-8″?>
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”>
<CustomAction Title=”Go to my custom application page” Id=”CustomAppPage”
Location=”Microsoft.SharePoint.SiteSettings” GroupId=”SiteCollectionAdmin”
Rights=”ManageWeb”>
<UrlAction Url=”~site/_layouts/15/MyTestApplicationPage/MyApplicationPage.aspx”/>
</CustomAction>
</Elements>

Here few attributes are important like:

Location: In which page you want to display, here I have set it for Site Settings Page.

  • GroupId: In which section you want to display, here I want to display it for the Site Collection Administration section. Here I want to display under site collection administration, so I set for “SiteCollectionAdmin”. If you want to add under Galleries, you can write GroupId=”Galleries” etc.
  • Rights: For which permission this will appear, Here I have set for “ManageWeb” permission.
  • Url: In the UrlAction Url property you can set the navigation page URL.

You can check this MSDN article for Page Custom Action Locations and Group IDs.

It will look like below:

add navigation link in site settings navigation page SharePoint 2013 using visual studio 2013
add navigation link in site settings navigation page SharePoint 2013 using visual studio 2013

After adding the Empty element, you can check the solution explorer, now a feature must have been added to it.

customize site settings navigation page SharePoint 2013 using visual studio
customize site settings navigation page SharePoint 2013 using visual studio

You can give a proper title and also I have added scope as Site.

customize site settings navigation page SharePoint 2013 using visual studio 2013
customize site settings navigation page SharePoint 2013 using visual studio 2013

Now it is time to deploy the solution. Right click on the solution and then click on Deploy solution. This will deploy the solution to the SharePoint. If you want to deploy the solution to any other server like your testing server or production server, you can use the WSP approach to deploy the solution.

Once it is deployed successfully, Open your SharePoint site then go to the site settings page, you will be able to see a link as “Go to my custom application page” under Site Administration as shown in the fig below:

add navigation link in site settings navigation page SharePoint 2013 using visual studio 2013
add navigation link in site settings navigation page SharePoint 2013 using visual studio 2013

You may like following SharePoint 2013 visual studio tutorials:

Hope this SharePoint tutorial explains, how to add navigation link in site settings navigation page SharePoint 2013 using visual studio 2013.

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

>