As promised I’m doing a series of SharePoint Tidbits on things I have learned about SharePoint 2013 during my classes. And the first I thought I would discuss was device channels.
Device Channels is a feature under Web Content Management, and this feature is to improve the way we deal with pages. In WSSv3 and MOSS 2007 you got one mobile page, it was the same no matter what kind of mobile device you were using. Which meant there where two ways to view the Site Collection the regular page and the mobile page.
So in SharePoint 2013 we have created a way that designers can design a site once, and then based on that design we will render it using different Style Sheets and Master Pages, multiple times. We can have these different sheets and Master Pages for one single device or a group of multiple devices together, it all depends on what experience you want to provide you users.
But hold it….how do we recognize which client goes to which Channel. Good question and we base the channels primarily on the User Agent String but if you want you can also use Query Strings, Cookies, or Custom Code. The User Agent String as I’m sure we all know identifies which browser you are using to connect with it is sent from the Client to the Server within the initial headers and contains certain tokens like Operating System, Browser, etc.
Finally how to set it up
- Create a Site Collection using the Publishing Template
- Go to Site Settings -> Look and Feel -> Device Channels
- You will see that the Default Channel is automatically created for you, I recommend you leave it for any devices that you don’t design to specifically.
- Now we need to create a channel for the devices we want to design for specifically.
- Click on New Item
- Enter a Name this is to identify the Channel when in the Site Collection
- Enter a unique Alias
- Enter a Description
- Enter one or more Device Inclusion Rules, these rules are one per line and need to include an identifying token from the User Agent like Windows Phone OS 7.5 or Android
4.0.3 or Safari/419.3
- Lastly there is a check box to make the channel active
- Now that you have the channel active and categorized you have to setup the different Site resources to the Channel, this can be done in two different ways
- Alternate Master Pages
i. Create your desired Master Page in the Master Page Gallery (Make sure it is approved)
ii. Under Site Settings go to Look and Feel -> Master Page then for each Channel select the Master Page that you want used
- Device Channel Panels
i. This is a control added to Page Layouts that are linked to a specific Channel and will only show when the connection comes thru that Channel.
Here are some of the browsers I would expect us to support
- Internet Explorer Mobile 9/10
Remember that you do not necessarily need the device to test your channel as there some great emulators out there, I have included links to them below
NOTE: I do not endorse or recommend any of these tools
Articles you may find useful
List of User Agent Strings
Understanding User-Agent Strings
Overview of mobile devices and SharePoint Server 2013
What’s new for mobile devices in SharePoint Server 2013