Try our conversational search powered by Generative AI!

Interface IUrlSegmentRouter

Specifies methods to resolve content from a URL

Namespace: EPiServer.Web.Routing.Segments
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public interface IUrlSegmentRouter

Properties

RootResolver

The resolver for root content where url resolving starts

Declaration
Func<SiteDefinition, ContentReference> RootResolver { get; set; }
Property Value
Type Description
System.Func<SiteDefinition, ContentReference>

Methods

GetRoutingSegment(ContentReference, String)

Gets the routing specific data for a contentLink.

Declaration
IRoutable GetRoutingSegment(ContentReference contentLink, string preferredLanguageBranch)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String preferredLanguageBranch

The preferred language branch.

Returns
Type Description
IRoutable

IsContentUnderRoot(ContentReference)

Determines whether the specified contentLink is located under the reference given by RootResolver for this router instance.

Declaration
bool IsContentUnderRoot(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
System.Boolean

true the specified contentLink is located under the root given by RootResolver; otherwise, false.

ResolveContentForIncoming(ContentReference, String, SegmentContext)

Resolves a related contentLink with given url segment.

Declaration
ContentReference ResolveContentForIncoming(ContentReference contentReference, string urlSegment, SegmentContext segmentContext)
Parameters
Type Name Description
ContentReference contentReference

The content reference.

System.String urlSegment

The URL segment.

SegmentContext segmentContext

The segment context.

Returns
Type Description
ContentReference

ContentLink if exist else null

ResolveContentForOutgoing(ContentReference)

Resolves the node representing the preceding url segment

Declaration
ContentReference ResolveContentForOutgoing(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentReference

the contentlink representing the preceding url segment

Extension Methods