{"id":1507,"date":"2015-07-10T08:55:26","date_gmt":"2015-07-10T07:55:26","guid":{"rendered":"http:\/\/blog.repsaj.nl\/?p=1507"},"modified":"2015-07-10T08:55:26","modified_gmt":"2015-07-10T07:55:26","slug":"sp-constructing-a-manage-site-metadata-navigation-link","status":"publish","type":"post","link":"http:\/\/blog.repsaj.nl\/index.php\/2015\/07\/sp-constructing-a-manage-site-metadata-navigation-link\/","title":{"rendered":"[SP] Constructing a &#8220;Manage site metadata navigation&#8221; link"},"content":{"rendered":"<p>If you&#8217;re aware of <a href=\"http:\/\/social.technet.microsoft.com\/wiki\/contents\/articles\/15876.sharepoint-2013-navigation-using-managed-metadata.aspx\" target=\"_blank\">Managed Metadata Navigation<\/a>, you might also know the hyperlink within the navigation settings which allows you to edit the sites&#8217; navigation termset. Now first thing you should know is that that link is often broken out of the box. When you click it, you\u00a0<strong>*should*<\/strong> only get the navigation termset and nothing else. But more than often, you&#8217;re taken to the full termstore manager displaying everything instead.\u00a0<!--more--><\/p>\n<p>Why? No idea to be honest, probably just a bug which never got noticed. Check out the URL behind the hyperlink:<\/p>\n<p>\/_layouts\/15\/termstoremanager.aspx?SiteUrlAndTermSetId=b413a8b8-04b7-4ab4-b8df-703af7be50f6|b2d24671-5fb9-4c90-a31b-d19aedd540bb|00000000-0000-0000-0000-000000000000<\/p>\n<p>Notice that last guid? Hmmm, an empty one&#8230; 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:<\/p>\n<p><a href=\"http:\/\/blog.repsaj.nl\/wp-content\/uploads\/2015\/07\/termstore.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1508\" src=\"http:\/\/blog.repsaj.nl\/wp-content\/uploads\/2015\/07\/termstore.png\" alt=\"termstore\" width=\"481\" height=\"434\" \/><\/a><\/p>\n<p>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?<\/p>\n<p>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&#8217;s the breakdown:<\/p>\n<p>\/_layouts\/15\/termstoremanager.aspx?SiteUrlAndTermSetId={webId}|{pagesListId}|{navigationTermSetId}<\/p>\n<p>{webId} = the ID (Guid) of the web using managed metadata navigation<br \/>\n{pagesListId} = the ID (Guid) of the Pages library within that web. Nope, I also don&#8217;t know what they need it for.<br \/>\n{navigationTermSetId} = the ID (Guid) of the navigation termset. If you provision automated, make sure you use a fixed\u00a0one instead of randomly generating.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re aware of Managed Metadata Navigation, you might also know the hyperlink within the navigation settings which allows you to edit the sites&#8217; navigation termset. Now first thing you should know is that that link is often broken out of the box. When you click it, you\u00a0*should* only get the navigation termset and nothing<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[34],"tags":[129,7,39],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3KFR1-oj","_links":{"self":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts\/1507"}],"collection":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/comments?post=1507"}],"version-history":[{"count":0,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/posts\/1507\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/media?parent=1507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/categories?post=1507"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.repsaj.nl\/index.php\/wp-json\/wp\/v2\/tags?post=1507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}