A place to share what I learn with everyone!
Todd BaginskiTodd Baginski

Enabling The effectiveDeviceChannel JavaScript Variable

By Todd Baginski
Enabling The effectiveDeviceChannel JavaScript Variable
Device Channels in SharePoint can set a JavaScript variable that you can use to dynamically render content based on the Device Channels.  The variable is called effectiveDeviceChannel.  This variable is turned off by default.  To enable it simply add a property named  PublishingInformationControlIncludeEffectiveDeviceChannel to the property bag of the root site in your site collection and give it a value of true. Here’s some PowerShell that does it.
$web = Get-SPWeb http://wcm.powder.ski/sites/pso
$web.AllProperties["PublishingInformationControlIncludeEffectiveDeviceChannel"] = "true"
$web.Update()
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:
class="cbs-pictureLine3 ms-textSmall ms-noWrap"id="_#= line3Id =#_"title="_#= line3 =#_">Model: _#= line3 =#_div> 1)
  • Blog(2)
  • Cloud(68)
  • Community(41)
  • GitHub(4)
  • Lacrosse(1)
  • Mobile(62)
  • Most Popular(19)
  • Office(21)
  • Office 365(80)
  • Operations(13)
  • PowerApps(57)
  • Publications(17)
  • SharePoint(58)
  • SharePoint 2007(22)
  • SharePoint 2010(40)
  • SharePoint 2013(20)
  • SharePoint 2016(6)
  • SharePoint Framework(1)
  • Speaking Engagements(41)
  • SPFx(1)
  • SPS Events Mobile(4)
  • Teams(3)
  • Uncategorized(3)
  • Windows 8(7)
  • Azure(24)
  • BCS(26)
  • CDS(3)
  • Flow(18)
  • Tags

    Custom DevelopmentSharePointHelpful CodeMobileO365PowerAppsCloudHOW TO: PowerAppsSharePoint 2010HOW TO: SharePointMobilityConferencesAzureBDCWindows Phone 7AndroidiPadSharePoint 2013Conference MaterialsiPhoneFlowSharePoint OnlineBCSWindows Phone 8iOSMagazine ArticlesSharePoint AppsWorkflowDevelopment UtilitiesMSDNSilverlightVirtual EnvironmentsExternal Content TypesSharePoint HostedSite DefinitionsSite TemplatesSPOVisual StudioWCMCDSIgniteSPFxSSOTeamsHyper-VIoTMappingOutlookSandboxSharePoint Certified ArchitectSharePoint DesignerSharePoint FrameworkVisual Web PartsXamarin.NET Assembly ConnectorAccess ServicesAptillonBCS FAQBooksClaudeCommon Data ServiceCommunityCompositesContainersCordovaCSS3DIYDockerFlowsGeolocationGitHubHOW TO: FlowHTML5InfoPath Forms ServicesJavaScriptJQueryJQuery MobileListsMashupsMCAMCMNofificationsOfficeOffice Add-insOffice Web Apps ServerOperationsPowerShellQuickLaunchSearchSharePoint 2016SharePoint AppSharePoint Certified MasterSharePoint Master CertificationSharePoint Mobile AppSharePoint SaturdaySP APPSPAPPSPS EventsSSSTop NavigationTrainingTwitterUniversalWindows PhoneWorkflowsWP7; SharePoint; SharePoint 2010; Social; MobileXCode

    17-Time Microsoft MVP

    Microsoft Most Valuable Professional

    5-Time Microsoft Fast Track Recognized Solution Architect (FTRSA)

    Microsoft FastTrack Recognized Solution Architect
    © 2026 Todd Baginski's Blog. All Rights Reserved.