Class PublishingPageTransformator
Transforms a classic publishing page into a modern client side page
Inherited Members
Namespace: PnP.Framework.Modernization.Publishing
Assembly: PnP.Framework.dll
Syntax
public class PublishingPageTransformator : BasePageTransformator
Constructors
PublishingPageTransformator(ClientContext, ClientContext)
Declaration
public PublishingPageTransformator(ClientContext sourceClientContext, ClientContext targetClientContext)
Parameters
|
ClientContext
sourceClientContext
|
|
ClientContext
targetClientContext
|
PublishingPageTransformator(ClientContext, ClientContext, PageTransformation, PublishingPageTransformation)
Declaration
public PublishingPageTransformator(ClientContext sourceClientContext, ClientContext targetClientContext, PageTransformation pageTransformationModel, PublishingPageTransformation customPublishingPageTransformationModel)
Parameters
|
ClientContext
sourceClientContext
|
|
ClientContext
targetClientContext
|
|
PageTransformation
pageTransformationModel
|
|
PublishingPageTransformation
customPublishingPageTransformationModel
|
PublishingPageTransformator(ClientContext, ClientContext, String)
Declaration
public PublishingPageTransformator(ClientContext sourceClientContext, ClientContext targetClientContext, string publishingPageTransformationFile)
Parameters
|
ClientContext
sourceClientContext
|
|
ClientContext
targetClientContext
|
|
System.String
publishingPageTransformationFile
|
PublishingPageTransformator(ClientContext, ClientContext, String, String)
Declaration
public PublishingPageTransformator(ClientContext sourceClientContext, ClientContext targetClientContext, string pageTransformationFile, string publishingPageTransformationFile)
Parameters
|
ClientContext
sourceClientContext
|
|
ClientContext
targetClientContext
|
|
System.String
pageTransformationFile
|
|
System.String
publishingPageTransformationFile
|
Methods
CreateInPlace(ClientContext)
Creates a transformator that writes the modern page into the Web that holds the publishing page.
Declaration
public static PublishingPageTransformator CreateInPlace(ClientContext sourceClientContext)
Parameters
|
ClientContext
sourceClientContext
Client context of the Web holding the publishing page |
Returns
|
PublishingPageTransformator
A transformator configured for in-place transformation |
CreateInPlace(ClientContext, PageTransformation, PublishingPageTransformation)
Creates a transformator that writes the modern page into the Web that holds the publishing page.
Declaration
public static PublishingPageTransformator CreateInPlace(ClientContext sourceClientContext, PageTransformation pageTransformationModel, PublishingPageTransformation customPublishingPageTransformationModel)
Parameters
|
ClientContext
sourceClientContext
Client context of the Web holding the publishing page |
|
PageTransformation
pageTransformationModel
Web part mapping model |
|
PublishingPageTransformation
customPublishingPageTransformationModel
Page layout mapping model |
Returns
|
PublishingPageTransformator
A transformator configured for in-place transformation |
CreateInPlace(ClientContext, String)
Creates a transformator that writes the modern page into the Web that holds the publishing page.
Declaration
public static PublishingPageTransformator CreateInPlace(ClientContext sourceClientContext, string publishingPageTransformationFile)
Parameters
|
ClientContext
sourceClientContext
Client context of the Web holding the publishing page |
|
System.String
publishingPageTransformationFile
Page layout mapping file |
Returns
|
PublishingPageTransformator
A transformator configured for in-place transformation |
CreateInPlace(ClientContext, String, String)
Creates a transformator that writes the modern page into the Web that holds the publishing page.
Declaration
public static PublishingPageTransformator CreateInPlace(ClientContext sourceClientContext, string pageTransformationFile, string publishingPageTransformationFile)
Parameters
|
ClientContext
sourceClientContext
Client context of the Web holding the publishing page |
|
System.String
pageTransformationFile
Web part mapping file |
|
System.String
publishingPageTransformationFile
Page layout mapping file |
Returns
|
PublishingPageTransformator
A transformator configured for in-place transformation |
LoadDefaultPageLayoutMappingFile()
Loads the default page layout mapping model file
Declaration
public static string LoadDefaultPageLayoutMappingFile()
Returns
|
System.String
|
Transform(PublishingPageTransformationInformation)
Transform the publishing page
Declaration
public string Transform(PublishingPageTransformationInformation publishingPageTransformationInformation)
Parameters
|
PublishingPageTransformationInformation
publishingPageTransformationInformation
Information about the publishing page to transform |
Returns
|
System.String
The path to the created modern page |
Remarks
In-place transformation requires the Site Pages web feature to be enabled before transformation. A manually created Web Page Library does not satisfy this prerequisite. The feature is not activated automatically.