Creating a site feature to apply branding

SharePoint features provide a mechanism to add our custom branding elements to the SharePoint farm at four different scopes. Features can be scoped to the farm level, web application level, site collection level, or site (web) level. In addition to adding content, they can run custom code when activated, upgraded, deactivated, and so on in feature event receivers.

In this recipe, we will create a site (web) scoped feature that adds and configures our branding elements on the site.

How to do it...

Follow these steps to create a feature event receiver:

  1. Open the SiteBranding feature that was created when creating for our MasterPages and PageLayouts modules.
  2. Verify that both the modules are listed in the Items ...

Get SharePoint 2013 WCM Advanced Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.