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.
Follow these steps to create a site collection feature and the event receivers:
Right-click on the
Features
folder.Click on Add Feature as shown in the following screenshot:
Rename the new feature
SiteCollectionBranding
.Open the new SiteCollectionBranding feature.
Set Scope to Site.
Set Title to
$Resources:Code6587ENCh04,Feature_SiteCollectionBranding_Title;
and Description to$Resources:Code6587ENCh04,Feature_SiteCollectionBranding_Description;
.Save the
SiteCollectionBranding
feature.Right-click on the project name.
Navigate to Visual C# Items | Office/SharePoint and select Event Receiver, as shown in...