Steps to create a custom master page in sharepoint 2010 using VS2010
Url ----> it create the folder structure exampl branding /mymaster creates the mymaster file inside the branding folder
- Create an empty SharePoint Solution
- Add a Module in the Project ( module name branding )
- Add a master page(master page name mymaster)
- Add the content in the master page
- Change the Element file as following
<?xml version="1.0" encoding="utf-8"?><Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="brading"> <File Path="brading\mymaster.master" Url="brading/mymaster.master" /></Module></Elements>
Url ----> it create the folder structure exampl branding /mymaster creates the mymaster file inside the branding folder
Add the event receiver as follows to change the master page at the time of feature activated
and change the default master page at at the time of feature deactivated
// Uncomment the method below to handle the event raised after a feature has been activated.public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPWeb currentWeb = (SPWeb)properties.Feature.Parent; currentWeb.MasterUrl = "/_catalogs/masterpage/mymaster.master"; currentWeb.CustomMasterUrl = "/_catalogs/masterpage/mymaster.master"; currentWeb.Update(); } // Uncomment the method below to handle the event raised before a feature is deactivated.public override void FeatureDeactivating(SPFeatureReceiverProperties properties) { SPWeb currentWeb = (SPWeb)properties.Feature.Parent; currentWeb.MasterUrl = "/_catalogs/masterpage/nightandday.master"; currentWeb.CustomMasterUrl = "/_catalogs/masterpage/nightandday.master"; currentWeb.Update(); }
Please note this is for the Site master no need to made much changes in the system master page.
Just change the logo of the master page that is enough.