Class UrlSegment
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. This class determines behavior for URL Segments, intended to be used by the UrlRewriter functionality.
Inheritance
Inherited Members
Namespace: EPiServer.Web.Internal
Assembly: EPiServer.dll
Version: 10.10.4Syntax
[ServiceConfiguration]
public class UrlSegment
Constructors
UrlSegment(IContentRepository)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the UrlSegment class.
Declaration
public UrlSegment(IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
IContentRepository | contentRepository |
Properties
UseLowerCaseSegments
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets a value indicating whether url segments should be created in lowercase.
Declaration
[Obsolete("Use configure using UrlSegmentOptions instead")]
public static bool UseLowerCaseSegments { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Default value is true.
Methods
GetContentBySegment(ContentReference, String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the content by segment.
Declaration
public virtual ContentReference GetContentBySegment(ContentReference parentLink, string urlSegment)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | parentLink | The parent reference |
System.String | urlSegment | The URL segment. |
Returns
Type | Description |
---|---|
ContentReference |
GetUniqueURLSegment(IContent)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets a friendly URL segment based on the content name and possibly a sequence number. URL Segments may collide within a specific content, i.e. different languageBranches can have the same URL Segment, but sibling nodes may not.
Declaration
[Obsolete("Use configure using IUrlSegmentCreator instead")]
public static string GetUniqueURLSegment(IContent content)
Parameters
Type | Name | Description |
---|---|---|
IContent | content | The content to create the segment for |
Returns
Type | Description |
---|---|
System.String | A valid URL segment for the content |
Remarks
There is potential for race here, since we don't save the segment once we've built it. The caller should probably lock for the duration.
GetUrlFriendlySegment(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Replace illegal chars with suggested replacements
Declaration
[Obsolete("Use configure using IUrlSegmentGenerator instead")]
public static string GetUrlFriendlySegment(string segment)
Parameters
Type | Name | Description |
---|---|---|
System.String | segment | The segment. |
Returns
Type | Description |
---|---|
System.String |
VerifyContentHasSegment(ContentReference, String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Verifies the content has segment.
Declaration
public virtual ContentReference VerifyContentHasSegment(ContentReference contentLink, string urlSegment)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | contentLink | The content link. |
System.String | urlSegment | The URL segment. |
Returns
Type | Description |
---|---|
ContentReference |
Events
CreatedUrlSegment
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Occurs when an url segment has been created
Declaration
[Obsolete("Use IUrlSegmentCreator.Creating instead")]
public static event EventHandler<UrlSegmentEventArgs> CreatedUrlSegment
Event Type
Type | Description |
---|---|
System.EventHandler<UrlSegmentEventArgs> |
CreatingUrlSegment
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Occurs when an url segment is to be created
Declaration
[Obsolete("Use IUrlSegmentCreator.Creating instead")]
public static event EventHandler<UrlSegmentEventArgs> CreatingUrlSegment
Event Type
Type | Description |
---|---|
System.EventHandler<UrlSegmentEventArgs> |