简体   繁体   中英

Creating a masterpage in Sharepoint 2013 with Visual Studio 2013

My current environment is:

  1. Windows Server 2012
  2. SharePoint Foundation 2013
  3. Visual Studio 2013
  4. SharePoint designer 2013

Here's my question:

I'm trying to do a proof of concept for our company to purchase SharePoint 2013 enterprise. I would like to modify the homepage or master page using Visual Studio 2013 and not have to use the designers. I've looked at lot of Google searches and videos. They all seem to talk about html files that don't come with SharePoint 2013 foundation or to use SharePoint tools that are not installed with foundation.

So far, I haven't found any video or website that explains how I can do this using my environment that I have stated above. I have worked in web application and Windows application development for years, but I am a definite newbie to SharePoint. If anyone can please direct me to someplace or a group of places that can step me through this I would appreciate it.

I just tested the solution in the link, and put some update for the summary:

  1. Go to masterpage library to download the masterpage you need to customize: SharePointSite/_catalogs/masterpage for example minimal.master and mininal.html

  2. Create new empty sharepoint project in the visual studio, add new module in, add the masterpages you downloaded

  3. Customized the Element.xml in the module, and make sure the below link is similar: Module Name="MasterPages" List="116" Url="_catalogs/masterpage" RootWebOnly="TRUE" the 116 is the list name of master page gallery, and the url is the master page gallery, please double check your own information to make sure

  4. Double check the feature added, and you can make the deployment level to site

  5. Deploy the solution, if some error mentioned list not available, please check the master page gallery information in the Element.xml, and compare it with the site you are working on.

  6. Go to the site Master page gallery to check your published master page, if your deployment choice not include the activate feature, make sure you activate feature in the site collection level as well.

have fun with your master page custimization.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM