简体   繁体   中英

Sharepoint Master Page Implementation

我已经有一位同事创建的母版页,如何在SharePoint中实现此母版页?

There are several ways you can use to change the master page of a SharePoint site. Here are some http://sharepointmagazine.net/articles/deploying-the-master-page , http://office.microsoft.com/en-us/sharepoint-designer-help/change-the-current-master-page-HA010167165.aspx . I hope it helps.

If you want to create and deploy a new master page using Visual Studio 2010, see following steps.

1.Right click SharePoint Project in Visual Studio select Add New Item.

2.Select Module Template and name it as MasterPageModule. Click Add.

3.Rename the Sample.txt to Sample.master

4.Open the Elements.xml, delete existing text and replace with following code

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="MasterPageModule" List="116" Url="_catalogs/masterpage">
    <File Path="MasterPageModule\Sample.master" Url="MasterPageModule/Sample.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="false" />
  </Module>
</Elements>

5.Open the existing site with SharePoint Designer.

6.Go to Site Objects -> Master Pages and copy v4.master

7.Rename and select the new file.

8.To edit the file select Customization -> Edit.

9.Select Yes for "Do you want to check it out?" message.

10.Select all code from the copied master page and copy to the Sample.master file.

11.Modify the code (You can also modify the file in SP Designer and then copy)

12.Build and deploy the solution.

13.Go to http:///_catalogs/masterpage/Forms/AllItems.aspx

14.Open the MasterPageModule Folder.

You'll see the deployed Sample.master page.

Using SharePoint designer, connect to your site and copy the master page file into the Master Page library. Then right click on the master page file in SP Designer and select "Set as Default Master Page".

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