Class CanonicalLinkExtensions
Extension methods for rendering Canonical link tags for content.
Inheritance
Namespace: EPiServer.Web.Mvc.Html
Assembly: EPiServer.Cms.AspNetCore.HtmlHelpers.dll
Version: 12.0.3Syntax
public static class CanonicalLinkExtensions : Object
Methods
CanonicalLink(IHtmlHelper)
Renders a canonical link element for the current context.
Declaration
public static IHtmlContent CanonicalLink(this IHtmlHelper html)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
html | The HTML. |
Returns
Type | Description |
---|---|
Microsoft. |
A canonical link element with the canonical url for the current context. |
CanonicalLink(IHtmlHelper, ContentReference, String, String)
Renders a canonical link element for the provided parameters.
Declaration
public static IHtmlContent CanonicalLink(this IHtmlHelper html, ContentReference contentLink, string language, string action)
Parameters
Type | Name | Description |
---|---|---|
Microsoft. |
html | The HTML. |
Content |
contentLink | The content link of the content. If null the current content will be used. |
System. |
language | The content language. If null the current content language or preferred language will be used. |
System. |
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. |
A canonical link element with the canonical url for the provided parameters. |