SharePoint Pals
 | Sign In
Custom Branding Feature in SharePoint 2013 – An Introduction
by Sathish Nadarajan 1 Apr 2015
SharePoint MVP
Today  :   2     Total  :    6257

Almost in all of the projects, we require to upload some JS, CSS, Images to the SharePoint and we will be using that from our Code. Usually we will be uploading them on the “Style Library” folder. Now, let us see, how to Organize that from our WSP and on the Feature Activation, how to make them to upload into “Style Library” folder.

1. Create an Empty SharePoint Project from Visual studio. Name it as Branding.Demo

2. Create a Module under the Branding.Demo Project. Name it as “Style Library”


3. By default, there will be a file called sample.txt will be created and an Element.xml file will be created.

4. Now, Create a folder called “Demo” Inside the “Style Library“ Module.

5. Move the sample.txt inside the “Demo” folder.

6. Now modify the Element.xml as below.

 <?xml version="1.0" encoding="utf-8"?>
 <Elements xmlns="">
   <Module Name="Style Library" Url="Style Library" RootWebOnly="TRUE">
     <File Path="Style Library\Demo\Sample.txt" Url="Demo/Sample.txt" Type="GhostableInLibrary" ReplaceContent="TRUE"  />

7. Select the Project Property.


8. Under SharePoint Tab, Select the Deployment Configuration as “No Activation”. This will make sure that whenever you deploy our WSP, the feature will not be activated. We need to explicitly activate the feature.

9. Double Click on the Feature and see the Feature properties. Make sure that the “Activate on Default” should be False and “Always Force Install” should be True.

10. Name your feature appropriately and set the scope as “Site”.

11. Now, deploy the WSP. You can see a new feature as we created.

12. On Activation of the Feature, the Sample.txt file will be placed on the “Style Library/Demo” folder. Like, this we can organize the JS, CSS, Images etc based on our requirement.

Hope this is very simple. But, this will be highly useful, when executing the project in a structured way. Instead of uploading the files manually, always we should maintain them in the Source Code and deliver it as a WSP rather than adding these things in the Release Notes.

Download the Source HERE

Happy Coding.

Sathish Nadarajan.

blog comments powered by Disqus

SharePoint Pals

SharePoint Pals, a community portal for SharePoint developers, Administrators and End Users. Let's join hands and share the point together.
Read this on mobile


Angular Js Training In Chennai
Advanced Angular Js training with real world developer scenarios
Angular Js, Web Api and Ionic for .Net Developers
All in one client side application development for .Net developers
Angular Js For SharePoint Developers
Get ready for the future. Its no more just C#

Get Connected

SharePoint Resources

SharePoint 2013 and 2010 Web Parts
Free Web Parts with Source Code for SharePoint Community

SharePoint 2013 Books and Tutorials
Collection of free SharePoint 2013 books and tutorials (eBooks, pdfs)

Supported By

Contribute your article and be eligible for a one month Free Subscription for Plural Sight. The Author of the most popular New Article (published in the previous month) will be awarded with a Free One month Plural Sight Subscription. Article can be sent to in a word document.

Related Resources

Recent Tweets

Twitter October 21, 21:34
How to Add a JS Link Reference to the Display Form or Any other ASPX Programmatically using CSOM PNP in SharePoint -

Twitter October 20, 13:01
How to Add a JS Link Reference to the NewForm and EditForm Programmatically using CSOM PNP in SharePoint Office 365-

Twitter October 12, 12:15
How to Deploy Provider Hosted Apps (Add-Ins) by App Stapling in SharePoint Office 365 -

Twitter October 11, 13:39
How to Deploy Provider HostedApp programmatically using CSOM in SharePoint Office 365 Activating Developer Feature -

Twitter October 10, 09:26
How to Use Angular HTTP Services in SharePoint List -

Follow us @SharePointPals
Note: For Customization and Configuration, CheckOutRecent Tweets Documentation