Pages

Wednesday, September 15, 2010

Module and File Tags Explanation in Sharepoint Deployment

Hello     

Let us today talk about Sharepoint Deployment Section.     

There are some situation where we need to add images to 12 hive folder because of it is needed by Sharepoint Application and it should be done by Deployment , Or let us say we need to add some of the already developed templates to document library when we add document library by feature. Sharepoint introduces two important attributes which allows us to do that which we normally defined in Elements.XML Let us understand and look at its detail properties of that two element.   

 The following table gives you description about the various attributes in the <Module> element.  
AttributeDescription
Name Name of the file set. 
Url Site-relative path where the files will be provisioned.  Let us upload one image on "SiteCollectionImages". 
Path Feature-relative path where the source files within the Feature are located. . 
RootWebOnly When set to TRUE, the files in the file set are provisioned in the top-level site of thesite collection. 

   

File sets contain one or more files and each element describes a separate file to provision into a SharePoint site.   

The following table details each of the attributes of <File> in the element.   
AttributeDescription
Name The name to assign the file when provisioned into the SharePoint site. This namebecomes part of the URL to the file.  
Url Feature-relative path to the file. This attribute is combined with the Path attribute inthe element.
Type When provisioning files into SharePoint libraries, this should always be set toGhostableInLibrary. When provisioning files into a SharePoint site but not addingthe file to a library, this should be Ghostable. 

 Example       
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">      

           <Module Name="SiteCollectionImages" List="116" Url="SiteCollectionImages">

               <File Url="footer_tagline.gif" Path="SiteCollectionImages/footer_tagline.gif" Type="GhostableInLibrary" IgnoreIfAlreadyExists="False"></File>  

         </Module 

</Elements>  

 Hope This Helps in Deployment

 Disha Shah




   

No comments:

Post a Comment