There was a requirement to get list owners info who created the lists, we developed a custom application page in SharePoint 2010: How to Create Custom Application Page in SharePoint 2010 to get List Owners
But the link to the application page to be placed somewhere on the site for easy access by site owners, isn’t it? Where to link it? The site settings page would be the ideal place for such things! So let’s add a link to the site settings page in SharePoint 2010.
SharePoint 2010: Add link to the site settings page
1. Create a new “Empty SharePoint Project” Farm Solution in Visual Studio 2010. Give it a Name.
2. Add an Empty Element to the Project. This will add “Elements.xml” file to the solution.
3. Update the Elements.xml file with the below code: This adds group to site settings as well as add link in site settings page in that group.
<!-- Add a Custom Group "Site Owner Reports" under Site Actions --> <CustomActionGroup Description="Group for Site Owner Reports" Id="Crescent.SiteOwnerReports" ImageUrl="/_layouts/images/crescent-rpt-48.png" Location="Microsoft.SharePoint.SiteSettings" Sequence="100" Title="Site Owner Reports"> </CustomActionGroup> <!-- Add a Link under the Group "Site Owner Reports" in Site Actions --> <CustomAction GroupId="Crescent.SiteOwnerReports" Id="UserInterfaceCustomActions.SiteSettings" Location="Microsoft.SharePoint.SiteSettings" Sequence="20" Title="List Owners Info"> <UrlAction Url="~site/_layouts/CrescentReports/ListOwners.aspx" /> </CustomAction>
5. Rename the Feature Title and Description through Feature Designer.
Location & ID parameters are the key in the above Elements.xml to add a link to the site settings page in SharePoint 2010. They define where the custom group or link should appear. You can place a link to any existing group by supplying its GroupID value.
- E.g. To add a link under Site Collection Administration group of site settings, Provide the Group ID as “SiteCollectionAdmin”
- To add a link to site settings under “Look and Feel”, the Group ID goes like “Customization”
If you want to add a custom group and link in SharePoint 2007, Refer: Add a Link to Site Settings Page in SharePoint 2010. For all available Locations, Refer MSDN: Default Custom Action Locations and IDs