Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class AlternateLinksExtensions

Extension methods for rendering Alternative link elements for multilingual content.

Inheritance
System.Object
AlternateLinksExtensions
Namespace: EPiServer.Web.Mvc.Html
Assembly: EPiServer.Cms.AspNetCore.HtmlHelpers.dll
Version: 12.0.3
Syntax
public static class AlternateLinksExtensions : Object

Methods

Renders a canonical link element for the current context.

Declaration
public static IHtmlContent AlternateLinks(this IHtmlHelper html)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html

The HTML.

Returns
Type Description
Microsoft.AspNetCore.Html.IHtmlContent

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

Renders a alternative link element for the provided parameters.

Declaration
public static IHtmlContent AlternateLinks(this IHtmlHelper html, ContentReference contentLink, string action)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper 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
Microsoft.AspNetCore.Html.IHtmlContent

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