Creating the site collection feature to apply the feature to new and existing sites

In this recipe, we will create a site collection scoped feature that will activate the site scoped branding feature to all sites in the site collection. In addition, we will add an event receiver to activate the site branding feature on all newly created sites.

How to do it...

Follow these steps to create a site collection feature and the event receivers:

  1. Right-click on the Features folder.
  2. Click on Add Feature as shown in the following screenshot:
    How to do it...
  3. Rename the new feature SiteCollectionBranding.
  4. Open the new SiteCollectionBranding feature.
  5. Set Scope to Site.
  6. Set Title to ...

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.