Class PageTypeConverter

Converts page type for pages

Inheritance
System.Object
PageTypeConverter
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public static class PageTypeConverter

Methods

Convert(PageReference, PageType, PageType, List<KeyValuePair<Int32, Int32>>, Boolean, Boolean)

Convert a page to a new page type

Declaration
public static string Convert(PageReference pageLink, PageType fromPageType, PageType toPageType, List<KeyValuePair<int, int>> propertyTypeMap, bool recursive, bool isTest)
Parameters
Type Name Description
PageReference pageLink

The link to the page which will be conversion will start

PageType fromPageType

The page type to convert from

PageType toPageType

Type page type to convert to

System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.Int32, System.Int32>> propertyTypeMap

"from"-"to" mappings of properties , the mapped properties has to be on the same base form

System.Boolean recursive

if set to true the conversion will be performed for all subpages as well

System.Boolean isTest

if set to true the conversion will not actually be performed bur rather a test run to see effect will be performed

Returns
Type Description
System.String

Convert(PageReference, PageType, PageType, List<KeyValuePair<Int32, Int32>>, Boolean, Boolean, IContentRepository)

Convert a page to a new page type

Declaration
[Obsolete("Use the overload public static string Convert(PageReference pageLink, PageType fromPageType, PageType toPageType, List<KeyValuePair<int, int>> propertyTypeMap, bool recursive, bool isTest) instead.", false)]
public static string Convert(PageReference pageLink, PageType fromPageType, PageType toPageType, List<KeyValuePair<int, int>> propertyTypeMap, bool recursive, bool isTest, IContentRepository contentRepository)
Parameters
Type Name Description
PageReference pageLink

The link to the page which will be conversion will start

PageType fromPageType

The page type to convert from

PageType toPageType

Type page type to convert to

System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.Int32, System.Int32>> propertyTypeMap

"from"-"to" mappings of properties , the mapped properties has to be on the same base form

System.Boolean recursive

if set to true the conversion will be performed for all subpages as well

System.Boolean isTest

if set to true the conversion will not actually be performed bur rather a test run to see effect will be performed

IContentRepository contentRepository

The IContentRepository instance to work with

Returns
Type Description
System.String

Events

PagesConverted

Raised when pages are converted from one pagetype to another.

Declaration
public static event EventHandler<ConvertedPageEventArgs> PagesConverted
Event Type
Type Description
System.EventHandler<ConvertedPageEventArgs>