Try our conversational search powered by Generative AI!

Class AlternateLinksExtensions

Extension methods for rendering Alternative link elements for multilingual content.

Inheritance
System.Object
AlternateLinksExtensions
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.Mvc.Html
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public static class AlternateLinksExtensions

Methods

Renders a canonical link element for the current context.

Declaration
public static MvcHtmlString AlternateLinks(this HtmlHelper html)
Parameters
Type Name Description
System.Web.Mvc.HtmlHelper html

The HTML.

Returns
Type Description
System.Web.Mvc.MvcHtmlString

A canonical link element with the canonical url for the current context.

Renders a alternative link element for the provided parameters.

Declaration
public static MvcHtmlString AlternateLinks(this HtmlHelper html, ContentReference contentLink, string action)
Parameters
Type Name Description
System.Web.Mvc.HtmlHelper html

The HTML.

ContentReference contentLink

The content for which alternate links should be rendered. If null, the currently routed content will be used.

System.String action

The controller action that should be appended to the url. If null the current action will be used. Use an empty string to remove the current action.

Returns
Type Description
System.Web.Mvc.MvcHtmlString

A canonical link element with the canonical url for the provided parameters.