Part 1: Installing Features and Adding Breadcrumbs to Custom Pages in Sharepoint Central Administrat
III. Adding Breadcrumbs
For custom pages breadcrumbs are not displayed by default and can be added in the following ways:
- Editing the admin.sitemap file
- Admin.sitemap file is located in the following path:
C:\Inetpub\wwwroot\wss\VirtualDirectories\[Site Port No.]\_app_bin - Open the admin.sitemap file from the above location and add the below at "/_admin/operations.aspx" sitemap node.
<siteMapNode url="/_admin/CACAdminPages/CustomPageOne.aspx" parentUrl="/_admin/operations.aspx" title="First Page"> <siteMapNode url="/_admin/CACAdminPages/CustomPageTwo.aspx" title="Second Page"> <siteMapNode url="/_admin/CACAdminPages/CustomPageThree.aspx" title="Third Page"/> <siteMapNode url="/_admin/CACAdminPages/CustomPageFour.aspx" title="Four Page"/> </siteMapNode> </siteMapNode> <siteMapNode url="/_admin/CACAdminPages/CustomPageFive.aspx" parentUrl="/_admin/operations.aspx" title="Fifth Page"/>
- Admin.sitemap file is located in the following path:
- Automerge:
This is the best and recommended way to add breadcrumbs in custom web pages in the live environment. It is an automated way to deploy in any number of front end servers.- Create an xml file as "admin.sitemap.*.xml" (naming convention should be followed, replace "*" with some name. Eg: admin.sitemap.custombreadcrumb.xml) with the below structure in the path-
[Sharpoint Installation Drive]\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\ADMIN
admin.sitemap.custombreadcrumb.xml:
<?xml version="1.0" encoding="utf-8"?> <siteMap enableLocalization="true"> <siteMapNode url="/_admin/CACAdminPages/CustomPageOne.aspx" parentUrl="/_admin/operations.aspx" title="First Page"> <siteMapNode url="/_admin/CACAdminPages/CustomPageTwo.aspx" title="Second Page"> <siteMapNode url="/_admin/CACAdminPages/CustomPageThree.aspx" title="Third Page"/> <siteMapNode url="/_admin/CACAdminPages/CustomPageFour.aspx" title="Four Page"/> </siteMapNode> </siteMapNode> <siteMapNode url="/_admin/CACAdminPages/CustomPageFive.aspx" parentUrl="/_admin/operations.aspx" title="Fifth Page"/> </siteMap> - Execute the following command in the Visual Studio Command prompt to merge this newly created sitemap file with the existing admin.sitemap file.
stsadm -o appbincontent
NOTE: Instead of hard coding the titles(like First Page) in the newly created sitemap file better to place them in resource files
- Now open the path-
[Sharepoint Installation Drive]\Inetpub\wwwroot\wss\VirtualDirectories\[Site Port No.]\_app_bin to check whether the admin.sitemap file contains the newly added sitemap file code.
(Full Size Image)
- Create an xml file as "admin.sitemap.*.xml" (naming convention should be followed, replace "*" with some name. Eg: admin.sitemap.custombreadcrumb.xml) with the below structure in the path-
- Creating a label(lblName) in the master page (admin.master) in [Sharepoint Installation Drive] \Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\ADMIN
Then in codebehind files of aspx file assign the label with the appropriate breadcrumb text(like Central Administration > Operations > First Page)
Master.FindControl("lblName").Text= "Central Administration > Operations > First Page"
Watch for part 2 of this article.
Thanks a lot.
Happy coding.
http://ambatisreedhar.spaces.live.com
http://ambatisreedhar.wordpress.com
About the Author
am Sreedhar Ambati working as a senior software engineer in Proteans Software Solutions Pvt ltd (www.proteans.com) Bangalore.
Proteans a CAMO group company is an outsourcing company focusing on software product development and business application development on Microsoft Technology Platform. "Committed to consistently deliver high-quality software products and services through continual improvement of our knowledge and practices focused on increased customer satisfaction."
Downloads
IT Offers
More for Developers
Top Authors
- Voted: 13 times.
- Voted: 11 times.
- Voted: 11 times.
- Voted: 8 times.
- Voted: 8 times.
- Paul Kimmel 214 articles
- Zafir Anjum 120 articles
- 15Seconds.com 99 articles
- Tom Archer - MSFT 83 articles
- Jeffrey Juday 82 articles


All