Adding a WebPart to a SharePoint 2013 Master Page

转载 2015年07月08日 01:03:39

On SharePoint 2013 you can not add the Web Parts to the master page the same way of 2010.
Please use the Design Manager -> Snippet Gallery.

In short:
You must wrap the Register tag with: <!--SPM: register tag -->
Like this:

<!--SPM:<%@Register Tagprefix="Publishing" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->

You should wrap the opening tag of your Web Part with: <!--MS: tag -->
And the closing tag with: <!--ME: tag -->
The Web Part would look like this:

<!--MS:<asp:SiteMapDataSource ShowStartingNode="True" SiteMapProvider="SPNavigationProvider" ID="topSiteMap" runat="server" StartingNodeUrl="sid:1002">--><!--ME:</asp:SiteMapDataSource>-->

(Snippet Gallery will automatically create the tags in the right way and you can copy it to your master page.)


SharePoint 2013 的Master page 中引入Jquery

本文讲述如何在SharePoint 2013 的Master page 中引入Jquery。 在SharePoint 2013 的Master page 中引入Jquery 分两种情况:    a...


This article explains how to create a newmaster page with a custom stylesheet and some custom images...

SharePoint 2013 开发——开发并部署webpart

SharePoint 2013 开发——开发并部署webpart

SharePoint 2013 WebPart Demo

  • 2013-12-06 16:25
  • 116KB
  • 下载

Sharepoint习题——master page

Question23 You have a SharePoint site. The current master page of the site is v4.master. You crea...

如何在SharePoint中创建Custom Master Page

SharePoint中有许多自带的模板页,但有时候不能满足我们的需要。那么怎么办呢?SharePoint提供自定义模板功能,下面我们来看看一个简单自定义模板是怎么实现的。 1. 安装Features...

SharePoint 2010 master page 控件介绍:ribbon

runat="server" PlaceholderElementId="RibbonContainer" CssFile="">   runat="server" Location.....

SharePoint 2013 中使用 JavaScript Like 和Unlike list item/page/document

SharePoint 2013中新增了很多社交功能,比如用户可以like/unlike 任何一个 list item/page/document,这是一个非常不错的功能。 但有时觉得like/unli...

小议:如何监控SharePoint 2013 Web Page的Performance?

好多企业员工在访问SharePoint2013 web site的时候,发现web page的Performance很慢,这就给企业的SharePoint管理员带来的难题——如何来监控WebPage...