Book Image

SharePoint 2013 WCM Advanced Cookbook

By : JOHN CHAPMAN
Book Image

SharePoint 2013 WCM Advanced Cookbook

By: JOHN CHAPMAN

Overview of this book

Table of Contents (19 chapters)
SharePoint 2013 WCM Advanced Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  3. Rename the new feature SiteCollectionBranding.

  4. Open the new SiteCollectionBranding feature.

  5. Set Scope to Site.

  6. Set Title to $Resources:Code6587ENCh04,Feature_SiteCollectionBranding_Title; and Description to $Resources:Code6587ENCh04,Feature_SiteCollectionBranding_Description;.

  7. Save the SiteCollectionBranding feature.

  8. Right-click on the project name.

  9. Click on Add and then select New Item.

  10. Navigate to Visual C# Items | Office/SharePoint and select Event Receiver, as shown in...