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 in the site for an easy access by site owners, isn't it? Where to link it? Site settings page would be the ideal place for such things! So lets add a link to site settings page in SharePoint 2010.
SharePoint 2010 add link to 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>Now the Elements.xml file should look like:
4. Add an Icon image to mapped "Images" folder. This image will display in site settings links group.
5. Rename the Feature Title and Description through Feature Designer.
6. Deploy the Project. Tha's all, We have added link to site settings page in SharePoint 2010. See the result in action:
Location & ID parameters are the key in above Elements.xml to add link to site settings page in SharePoint 2010. They defines 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"
You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.