Home > features, file, module, provision, SharePoint > Provision a File in SharePoint using Features

Provision a File in SharePoint using Features


Modules are defined in an element manifest similarly to how they are defined in an Onet.xml file to specify files with which to provision SharePoint sites. This type of feature element can be used to:

  • Add pages to a web site
  • Add web parts to a web site’s web part gallery
  • Add web parts to a web part page
  • Add documents to a document library
  • Add style sheets to the a web sites style library
Let us look at a sample feature.xml and elements.xml used to provision master page,document,web part and stylesheet
Feature.xml
<Feature Id="947F6C32-E898-45f5-A595-C46F07DA6BF7"
Title="Module Provisioning Files"
Scope="Web"
xmlns="http://schemas.microsoft.com/sharepoint/">




Elements.xml














<File Path="CustomWebPart\CustomWebPart.webpart"
Url="CustomWebPart.webpart"
Type="GhostableInLibrary" />








Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: