Todd Baginski's Blog - A SharePoint, Mobile, Office365, PowerApps and Azure Blog
Here’s some PowerShell that does it.
$web = Get-SPWeb http://wcm.powder.ski/sites/pso
$web.AllProperties["PublishingInformationControlIncludeEffectiveDeviceChannel"] = "true"
After you add the property, you can access it inside a Display Template and react to the variable and render your content based on Device Channels, like this:
if(!line3.isEmpty && effectiveDeviceChannel!=”Mobile”)
<div class=”cbs-pictureLine3 ms-textSmall ms-noWrap”id=”_#= line3Id =#_”title=”_#= line3 =#_”>Model: _#= line3 =#_</div>
This example only renders the Model number for an item displayed by the Content By Search Web Part that uses this Display Template. The Model number is mapped to the line3 variable.
Here’s what the output looks like in the Default Device Channel. Notice the Model number is displayed for the product.
Here’s what the output looks like in the Mobile Device Channel. Notice the Model number is not displayed for the product.
Go get your ski goggles! ABasin opens in 2 days!