Deploying Custome Master Page in Sharepoint Through Feature

This is quite simple to understand actually. We use the Module element to provision files out to the SharePoint server. In Module element has a Name and URL attribute, The Name attribute specifies a user-chosen name for this grouping of files to be provisioned we can give any convenience name. The URL attribute specifies the relative URL that you would like these files deployed to like if we have a master page so, Master Page save in _catalog/master so we have to give this URL. ( Url=”_catalogs/masterpage”> )
Within the Module node, we specify each file we want to provision using the File Element. And in our case we have only one Master page file to provision out. This File node has a URL, Type and IgnoreIfAlreadyExists attributes associated with it.
1. URL attribute in File node specify where this particular file resides like in our case we have master page in feature folder so the URL will be 12\TEMPLATE\FEATURES\YourFeatureFolderName.
2. The Type attribute in File node represent whether the file will be cached on a front-end server or not and if the file should be appear in the library it is being provisioned to.
3. IgnoreIfAlreadyExists Just mean that if the file is found to already exist in the library it is in destination library during provisioning, it will be provisioned anyway without any warning.

You can see in above image which represent the MasterPage deployment through Feature.
If the solution has successfully been activated, go over to the master page gallery that you provisioned the file out to and you should successfully see the master page in the gallery ready to be used:
As we saw, provisioning files to a library on a SharePoint farm is very simple ?. This technique can be used to deploy files to any type of library on your site the one thing about file provisioning is that upon deactivation of the feature, the files are not removed from the libraries they were deployed to.

About Krishana Kumar

Krishana Kumar is SharePoint Architect/Trainer having Architecture experience with high volumes at Enterprise level and global scale - creation of highly scalable solutions with global user base and geographically distributed architectural components. Good knowledge of SharePoint best practices and governance models. I hold Two Master degree in Computer Science with over 11 years of experience working on Microsoft Technologies specially SharePoint, Project, .NET and other Information Worker Technologies. Having good exposer in Client side scripting Angular.js, backbone and Node. I am currently responsible for SharePoint Infrastructure set up and leading teams in various medium and large scale projects, architecting, designing & installing SharePoint farms, developing custom components,, and providing advanced SharePoint administration and development training to teams and customers. I regularly speaks in various SharePoint User Groups and other Events. I have MCSA Windows Azure, MCSA Office 365, MCSE & MCSD SharePoint 2013, Microsoft Certified Developer (MCD) and holds MCPD, MCTIP and MCTS for SharePoint 2010, MCTS MOSS 2007 & WSS 3.0, MCPD, MCITP (EPM 2010 & 2007) and MCSD .NET.
This entry was posted in General Interest. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *