Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

Scripted update of SP2013 Search Center navigation links

$
0
0

Not wanting to have to hand edit my custom navigation links between lab, test, and production I wrote a little script to do it for me.   It takes as input an xml file that defines the title and url of each link (I haven’t added support for external links yet but if needed, it would be an easy change).

The only trick, other than initially finding the SearchNav property, was that when you first create the  SSNavigationNode the title isn’t visible on the property until you call AddToSearchNav.   Oh and you can’t change the url of an existing node.  You need to delete and re-add.

Now that I’m writing this I realize that I haven’t handled making sure the order is kept in sync with the config file… but that’ll have to wait until another day.

You can download the script from Script Center: [Initialize-SPSearchNavs.ps1]


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>