Class ContentReferenceExtensions
Extenstions method
Inheritance
System.Object
ContentReferenceExtensions
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public static class ContentReferenceExtensions : Object
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 |