SharePoint Tip of the day – Don’t forget the Managed Metadata friendly “PageFieldValue” CQWP filter to create rich OOTB relations between your content


Another reminder to myself (like nearly all the posts in this small diary) to rely whenever possible on the Content Query WebPart “PageFieldValue” for the relation between content.
No custom user/web controls wrapped or not in webpart(s), no extensive search service configuration and core search result webpart configuration (altough I still like that option !), the good old trusty CQWP with its PageFieldValue and the ability to work natively with Managed metada field (including children terms) is a pure joy to use.

And if you’re targeting content that might also bring the actual page, don’t forget to exclude it (eg : by its title or its ID) through once again the PageFieldValue since it will be obviously the first candidate to match your filter.

SharePoint Tip of the Day – PowerShell snippet to disable mobile view for a specific web application

A good reminder to myself to exclude this from feature receiver and put it on separate PowerShell scripts that can be easily run only on specific environment(s).

$webApp = Get-SPWebApplication "" $configMod = New-Object Microsoft.SharePoint.Administration.SPWebConfigModification$configMod.Path = "configuration/system.web"$configMod.Name = "browserCaps"$configMod.Sequence = 0 $configMod.Type = 0$configMod.Value = "<browserCaps> </browserCaps>" $childConfigMod = New-Object Microsoft.SharePoint.Administration.SPWebConfigModification$childConfigMod.Path = "configuration/system.web/browserCaps" $childConfigMod.Name = "result"$childConfigMod.Sequence = 0$childConfigMod.Type = 0$childConfigMod.Value = "<result type=""System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a""/><filter>isMobileDevice=false</filter>"  $webApp.WebConfigModifications.Add($configMod)$webApp.WebConfigModifications.Add($childConfigMod)$webApp.Update()$webApp.Parent.ApplyWebConfigModifications()$webApp.WebConfigModifications.Clear()