Class UrlSegmentOptions
Contains options used to specify how url segments should be created. It is used by IUrlSegmentCreator and IUrlSegmentGenerator
Inheritance
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 11.20.7Syntax
[Options]
public class UrlSegmentOptions
Constructors
UrlSegmentOptions()
Creates a new instance of UrlSegmentOptions
Declaration
public UrlSegmentOptions()
Properties
CharacterMap
Specifies a mapping table for characters not allowed due to ValidCharacters.
Declaration
public IDictionary<char, char> CharacterMap { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.Char, System.Char> |
Remarks
Characters that are not allowed due to ValidCharacters and do not have a mapped replacement in CharacterMap will be removed from segment.
Encode
Declaration
[Obsolete("Use SupportIriCharacters instead")]
public bool Encode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ReservedSegments
Defines segments that are reserved by e.g. IIS
Declaration
public IList<string> ReservedSegments { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> |
Remarks
Default values are "bin", "app_code", "app_globalresources", "app_localresources", "app_webreferences", "app_data", "app_browsers"
SupportIriCharacters
Indicates if segments supports IRI characters. If ValidCharacters are set to allow characters that are not allowed in url segments according to url specification this should be set to true.
Declaration
public bool SupportIriCharacters { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Purpose of this is to indicate to for example rendering components that the segment might need to be encoded.
UseLowercase
Indicates if only lowercase characters should be used in url segments
Declaration
public bool UseLowercase { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Default value is true
ValidCharacters
Gets or sets the characters that are valid to use as url segment, will be used as argument to Regexp
Declaration
public string ValidCharacters { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Default value is 'A-Za-z0-9-_~.$'
ValidUrlCharacters
Declaration
[Obsolete("Use ValidCharacters instead")]
public string ValidUrlCharacters { get; set; }
Property Value
Type | Description |
---|---|
System.String |