Chapter 2. Branding SharePoint with Device Channels and Design Packages

In this chapter, we will cover packaging out-of-the-box branding elements and targeting the branding for specific devices. We will cover the following recipes:

  • Creating a device channel for mobile devices
  • Applying a master page to a device channel
  • Creating and exporting a design package
  • Importing and applying a design package
  • Importing a design package to all site collections with PowerShell
  • Listing the device channel master pages

Introduction

With the 2013 release of SharePoint, Microsoft has added two new capabilities that assist with full-scale branding of SharePoint sites: device channels and design packages. A device channel uses the user agent of the web browser sending the incoming web request to determine which master page to render the content pages with. A common use of the device channels is to detect tablets and smartphones to use a more touch-friendly interface design. For instance, a device channel can be configured to look for an iPad in the following user agent to identify the iPad devices:

Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53

Tip

Any portion of the user agent can be used for a device channel. It is important to be specific, but not too specific. Using iPad would apply to all the devices that specify iPad in their user agent, whereas iPad; U; CPU OS 7_0 would only apply to iPads running on iOS Version 7.0.

A design package is a SharePoint solution, packaged as a WSP file containing branding customizations, such as master pages and cascading style sheets. This provides a simple method of exporting a site design from one site and applying it to another. A design package will only contain items that are not default to SharePoint. Default items, such as the included master pages, will be referenced, but are not included as part of the package.

Prior to SharePoint 2013, packaged design solutions could only be created manually or with Visual Studio. Design packages allow any site collection administrator to create and apply packaged designs. This allows the site collection administrators to obtain packaged designs (from third parties, and so on) and apply them, without having to manually upload and configure each piece of the design.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.62.168