Feature 添加母版页(Feature)

XML代码如下:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

  <Module Name="_catalogs" Url="_catalogs/masterpage">
    <File Path="SimpleDefaultMaterModule\simple-fdn.master" Url="simple-fdn.master" 
          Type="GhostableInLibrary" />
  
</Module>

  <Module Name="Style Library" Url="Style Library/SAGE"  Path="SimpleDefaultMaterModule\Style Library">
    <File Url="simple.css" Type="GhostableInLibrary"   
          Path="simple.css"/>
    <File Url="search.png" Type="GhostableInLibrary" IgnoreIfAlreadyExists="True" 
          Path="search.png"/>
  </Module>
</Elements>

注意:1. Path是文件的现存的相对路径, URL是要放到网站哪里的相对路径
         2. Path及URL都分头及行

文件的截图如下:

DefaultMaster

文件源码如下下载:

https://files.cnblogs.com/gzh4455/SimpleDefaultMaster.zip

原文地址:https://www.cnblogs.com/gzh4455/p/2787428.html