Class LinkItemExtensions
Class that is used to represent and work with a html link.
Inheritance
System.Object
LinkItemExtensions
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.SpecializedProperties
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
public static class LinkItemExtensions
Methods
GetMappedHref(LinkItem, Boolean)
Tries to get a mapped representation of the "Href" property; otherwise returns the "Href".
Declaration
[Obsolete("Use the overload of GetMappedHref without any parameters.", false)]
public static string GetMappedHref(this LinkItem linkItem, bool addPreferredLanguageIfEmpty)
Parameters
Type | Name | Description |
---|---|---|
LinkItem | linkItem | |
System.Boolean | addPreferredLanguageIfEmpty |
Returns
Type | Description |
---|---|
System.String | A mapped representation of the link. |
Language(LinkItem)
Gets the language from the link item.
Declaration
[Obsolete("Use 'new UrlBuilder(linkItem.Href).QueryLanguage' to parse language query from a link item")]
public static string Language(this LinkItem linkItem)
Parameters
Type | Name | Description |
---|---|---|
LinkItem | linkItem |
Returns
Type | Description |
---|---|
System.String | The language. |
Remarks
In case no language is specified LanguageResolver is returned.
ToMappedLink(LinkItem, Boolean)
Creates an external representation of the link.
Declaration
[Obsolete("Use the overload of ToMappedLink without any parameters.", false)]
public static string ToMappedLink(this LinkItem linkItem, bool addPreferredLanguageIfEmpty)
Parameters
Type | Name | Description |
---|---|---|
LinkItem | linkItem | |
System.Boolean | addPreferredLanguageIfEmpty |
Returns
Type | Description |
---|---|
System.String | An external representation of the link. |