Table of contents
TOC
Collapse the table of content
Expand the table of content

BrandingExtensions.SetCustomMasterPageByUrl Method

SharePoint Dev Documents|Last Updated: 5/20/2017
|
1 Contributor

Set Custom master page by using given URL as parameter. Suitable for example in cases where you want sub sites to reference root site master page gallery. This is typical with publishing sites.

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static void SetCustomMasterPageByUrl(this Web web, String masterPageServerRelativeUrl, Boolean resetSubsitesToInherit = False, Boolean updateRootOnly = False)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Context web

masterPageServerRelativeUrl

  Type: System.String
  URL to the master page.

(optional) resetSubsitesToInherit

  Type: System.Boolean
  false (default) to apply to currently inheriting subsites only; true to force all subsites to inherit

(optional) updateRootOnly

  Type: System.Boolean
  false (default) to apply to subsites; true to only apply to specified site

Return Value

Type: void

See also

© 2018 Microsoft