Step I: Create Master Page Design Manager using
To create a minimal master page
- Browse to your publishing site.
- In the upper-right corner of the page, choose Settings, and then choose Design Manager.
- In Design Manager, in the left navigation pane, choose Edit Master Pages.
- Choose Create a minimal master page.
- In the Create a Master Page dialog box, enter a name for the master page, and then choose OK.At this point, SharePoint creates both a .master file and an associated HTML file with the same name in the Master Page Gallery.In Design Manager, your HTML file now appears with Conversion successful displayed in the Status column.
- Follow the link in the Status column to preview the file.The preview page is a live server-side preview of your master page.For more information about previewing the master page with different pages, see How to: Change the preview page in SharePoint 2013 Design Manager.The preview page also contains a Snippets link in the upper-right corner. This link opens the Snippet Gallery, where you can begin replacing static or mock-up controls in your design with dynamic SharePoint controls. For more information, see SharePoint 2013 Design Manager snippets.After your master page previews successfully, you will see a <div> tag that gets added to your HTML file. You may have to scroll to the bottom of the page to see the <div> tag.This <div> is the main content block. It resides inside a content placeholder named ContentPlaceHolderMain. At run time, when a visitor browses your site and requests a page, this content placeholder gets filled with content from a page layout that contains content in a matching content region. You should position this <div> where you want your page layouts to appear on the master page.
- You can edit the HTML file that resides directly on the server by using an HTML editor to open and edit the HTML file in a mapped drive. Each time you save the HTML file, any changes are synced to the associated .master file. For more information, see How to: Map a network drive to the SharePoint 2013 Master Page Gallery.
Step II : Download the MasterPage and HTML
- Go to MasterPage Gallary
- Find your created Master Page and HTML File and “Download A Copy” the same by clicking on the right side … button
- Keep the Downloaded files to specific location
Step III : Integrate the created master page in Step I to Visual Studio Project
- Create the module as depicted in below fig,
- Add the Step II copied .MasterPage and .HTML to Module
- Edit the the Element.xml as below,
- Create a publishing feature and add the the module to it
- Deploy the Feature and activate the same
- Now Master Page should reflect to master page gallery of deployed site