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:
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.
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:
After adding the Empty element, you can check the solution explorer, now a feature must have been added to it.
You can give a proper title and also I have added scope as Site.
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:
You may like following SharePoint 2013 visual studio tutorials:
- SharePoint 2013 Create a custom master page using Visual Studio 2013
- How to create application pages in SharePoint 2013 using Visual Studio 2013?
- Implement Custom Promoted Actions Delegate Control in SharePoint 2013
- Delegate Controls in SharePoint 2013 using Visual Studio 2013
- Create Visual WebPart using Visual Studio 2013 in SharePoint 2013
- Custom Ribbon Action and set the Customize Icon to Ribbon button in a SharePoint Hosted App
- Adding Custom Ribbon Tab in the SharePoint 2013 Server Ribbon
- Create a custom Action group using visual studio 2010 in SharePoint 2010
- Implement Custom SuiteLinks Delegate Control in SharePoint 2013
- Create a Custom Action Group using Visual Studio 2015 for SharePoint 2016
- SharePoint Online Develop SharePoint Hosted Add-in using Visual Studio 2015 Demo
- SharePoint 2016 Develop and deploy custom feature using Visual Studio 2015
- SharePoint 2016 How to create list instance and list definition using Visual Studio 2015
- Create a web part page using visual studio 2013 in SharePoint 2013
- Create and Deploy SharePoint 2013 site pages or content pages using Visual Studio 2013
Hope this SharePoint tutorial explains, how to add navigation link in site settings navigation page SharePoint 2013 using visual studio 2013.
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 SPGuides.com
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.