Posts

Showing posts from June, 2014

Set the logo of all sites in a SharePoint 2013 site collection using PowerShell - Flash post

If you want to quickly set the site logo of a complete SharePoint 2013 site collection, enter the following: (get-spsite  http://YourSiteCollectionURL ).AllWebs | foreach {$_.SiteLogoUrl = “/relative/path/to/companylogo.png”; $_.Update()} Thats all :)

Open termbased navigation links in new window in SharePoint 2013

Term based navigation has been greatly improved in SharePoint 2013, but sometimes you want to open navigation URLs in a new window. However, the term store does not offer such a property so we'll solve it using JavaScript instead. In the masterpage element add this script: script language="JavaScript" // Adding an entry to _spBodyOnLoadFunctionNames array so the function runs on pageLoad _spBodyOnLoadFunctionNames.push("rewriteNavigationLinks"); function rewriteNavigationLinks() { // collecting anchors var anchorArray = document.getElementsByTagName("a"); for (var x=0; x 0) { oldUrl = anchorArray[x].outerHTML; // adding target attribute newUrl = oldUrl.replace(/#targetnewwindow/,'" target="_blank'); anchorArray[x].outerHTML = newUrl; } } } /script Then in the term store append "#targetnewwindow" on the link to activate the specific link. E.g. http://intranet.foo/somepagename.aspx?pid=000#