[SP] Constructing a “Manage site metadata navigation” link
If you’re aware of Managed Metadata Navigation, you might also know the hyperlink within the navigation settings which allows you to edit the sites’ navigation termset. Now first thing you should know is that that link is often broken out of the box. When you click it, you *should* only get the navigation termset and nothing else. But more than often, you’re taken to the full termstore manager displaying everything instead.
Why? No idea to be honest, probably just a bug which never got noticed. Check out the URL behind the hyperlink:
/_layouts/15/termstoremanager.aspx?SiteUrlAndTermSetId=b413a8b8-04b7-4ab4-b8df-703af7be50f6|b2d24671-5fb9-4c90-a31b-d19aedd540bb|00000000-0000-0000-0000-000000000000
Notice that last guid? Hmmm, an empty one… so what happens when you replace that one with the Id of your actual termset? Hey, now it shows only what you want to see, check it out:
Because this was a client environment I obfuscated some of the items in there, you get the idea though. See how only the Navigation termset is shown and the rest is hidden?
So now you might want to give your users a direct link to this option from somewhere else. So you need to know how that URL is built, especially in scenarios where you automatically provision these things. Here’s the breakdown:
/_layouts/15/termstoremanager.aspx?SiteUrlAndTermSetId={webId}|{pagesListId}|{navigationTermSetId}
{webId} = the ID (Guid) of the web using managed metadata navigation
{pagesListId} = the ID (Guid) of the Pages library within that web. Nope, I also don’t know what they need it for.
{navigationTermSetId} = the ID (Guid) of the navigation termset. If you provision automated, make sure you use a fixed one instead of randomly generating.
Leave a Comment