Try our conversational search powered by Generative AI!

Class SegmentHelper

Helper class for routing segments.

Inheritance
System.Object
SegmentHelper
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.Web.Routing.Segments
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public static class SegmentHelper

Methods

GetModifiedVirtualPathInEditOrPreviewMode(ContentReference, String, ContextMode)

Gets a modified virtual path in edit/preview mode, if the contextMode is in edit or preview mode.

Declaration
public static string GetModifiedVirtualPathInEditOrPreviewMode(ContentReference contentLink, string virtualPath, ContextMode contextMode)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String virtualPath

The original virtual path.

ContextMode contextMode

The context mode.

Returns
Type Description
System.String

A modified virtual path if the contextMode is in edit/preview mode, otherwise the virtualPath

TryGetIncomingNodeInEditOrPreviewMode(SegmentContext, SegmentPair, out ContentReference)

Tries to get the incoming node in edit/preview mode.

Declaration
public static bool TryGetIncomingNodeInEditOrPreviewMode(SegmentContext context, SegmentPair segmentPair, out ContentReference versionSpecificContentReference)
Parameters
Type Name Description
SegmentContext context

The context.

SegmentPair segmentPair

The segment pair to use.

ContentReference versionSpecificContentReference

The returned content reference.

Returns
Type Description
System.Boolean

True if the context is in edit/preview mode, and a version specific content reference was found. Otherwise false.