Custom SharePoint Server 2016 Publishing Site Collection Breadcrumb Navigation Menu Using REST

Brass Contributor

My organization is migrating a SharePoint 2010 publishing site collection to SharePoint 2016. With the jumps up in versions, many customization will not work or simply have to go due to the amount of work it would take to update them. One such customization is breadcrumb navigation.

 

As the architect for the collection, I would like to implement a custom breadcrumb menu using the REST APIs, queried via client side JavaScript using JSON. I have not been able to figure out or find suitable examples on which endpoint(s) to use and how- if this is even possible.

 

I've been searching for anything I can find on SiteMapProvider. While the information I have found has been helpful, I have not found a perfect example on how, from the context of the current page, to query for the path up to the site or site collection root. We are using managed metadata navigation for global navigation and local/current navigation is manually structured- so I cannot easily parse the navigation tree to match against the current page.

 

Any assistance is appreciated.

 

2 Replies

Hi @Deleted,

 

I've been working with the endpoints, but have not looked into modern/SPFx approaches. Thank you for those references.

 

I am afraid SPFx is going to be burdensome, given all of the prerequisites. This is a publishing site with a custom design via Design Manager. The UI is done, it is the data that I need. It appears that the best I can do is to get a dump of all navigation nodes and parse out the breadcrumbs based on the current page. Or use the native breadcrumb snippet and restructure and style the heck out of it.

 

All I need is an UL/OL list of breadcrumb links based on the current page. <sigh />