November Happy Hour will be moved to Thursday December 5th.

Class ContentReferenceExtensions

Extenstions method

Inheritance
System.Object
ContentReferenceExtensions
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: 9.12.2
Syntax
public static class ContentReferenceExtensions

Methods

ToPageReference(ContentReference)

Converts the content link to Page Reference.

Declaration
public static PageReference ToPageReference(this ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
PageReference
Remarks

If the content link is not a PageRefernce then new PageReference object be returned.

ToReferenceWithoutVersion(ContentReference)

If the current instance is references a version a new instance with will be created without version

Declaration
public static ContentReference ToReferenceWithoutVersion(this ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink
Returns
Type Description
ContentReference

ToReferenceWithoutVersion(PageReference)

If the current instance is references a version a new instance with will be created without version

Declaration
public static PageReference ToReferenceWithoutVersion(this PageReference contentLink)
Parameters
Type Name Description
PageReference contentLink
Returns
Type Description
PageReference