Class StructureHtmlHelperExtensions
Extensions related to page links for Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper.
Inheritance
Namespace: EPiServer.Web.Mvc.Html
Assembly: EPiServer.Cms.AspNetCore.HtmlHelpers.dll
Version: 12.0.3Syntax
public static class StructureHtmlHelperExtensions : Object
Methods
ContentLink(IHtmlHelper, ContentReference)
Creates an html anchor to a node by page link using the name of the page as the link text.
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, ContentReference contentLink)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| ContentReference | contentLink | A reference to the page that should be the target of the link. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, ContentReference, HtmlLinkArguments)
Creates an html anchor to a node by content link.
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, ContentReference contentLink, HtmlLinkArguments linkArguments)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| ContentReference | contentLink | A reference to the content that should be the target of the link. |
| HtmlLinkArguments | linkArguments | the link attributes such as link text, htmlAttributes, forceAbsolute and forceCanonical |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, ContentReference, Object, Object)
Creates an html anchor to the specified content.
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, ContentReference contentLink, object routeValues, object htmlAttributes)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| ContentReference | contentLink | The content link. |
| System.Object | routeValues | The route values |
| System.Object | htmlAttributes | The htmlAttributes |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, IContent)
Creates an html anchor to the specified content.
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, IContent content)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| IContent | content | The content that should be the target of the link. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, IContent, Object, Object)
Creates an html anchor to the specified content.
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, IContent content, object routeValues, object htmlAttributes)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| IContent | content | The content that should be the target of the link. |
| System.Object | routeValues | The route values |
| System.Object | htmlAttributes | The htmlAttributes |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, PropertyContentReference)
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, PropertyContentReference propertyData)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | |
| PropertyContentReference | propertyData |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, PropertyData)
Creates an html ancor to a node by a property data
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, PropertyData propertyData)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | Html helper instance |
| PropertyData | propertyData | Property data to create the html ancor from |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent | HtmlString containing the page link |
ContentLink(IHtmlHelper, LinkItem)
Creates an html ancor to a node by a link item
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, LinkItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | Html helper instance |
| LinkItem | item | Link item to create the html ancor from |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent | HtmlString containing the page link |
ContentLink(IHtmlHelper, String, ContentReference)
Creates an html anchor to a node by page link.
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, string linkText, ContentReference contentLink)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| System.String | linkText | The link text. |
| ContentReference | contentLink | A reference to the page that should be the target of the link. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, String, ContentReference, Object, Object)
Creates an html anchor to a node by content link.
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, string linkText, ContentReference contentLink, object routeValues, object htmlAttributes)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| System.String | linkText | The link text. |
| ContentReference | contentLink | A reference to the content that should be the target of the link. |
| System.Object | routeValues | The route values |
| System.Object | htmlAttributes | The htmlAttributes |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, String, String)
Creates an html anchor with link text to an action on current routed content item
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, string linkText, string action)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| System.String | linkText | The link text. |
| System.String | action | The action to link to |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
ContentLink(IHtmlHelper, String, String, ContentReference)
Creates an html anchor with link text to an action on current routed content item
Declaration
public static IHtmlContent ContentLink(this IHtmlHelper htmlHelper, string linkText, string action, ContentReference contentLink)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| System.String | linkText | The link text. |
| System.String | action | The action to link to |
| ContentReference | contentLink | A reference to the content to render an action link to |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
PageLink(IHtmlHelper, ContentReference, HtmlLinkArguments)
Creates an html anchor to a node by page link.
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, ContentReference contentLink, HtmlLinkArguments linkArguments)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| ContentReference | contentLink | A reference to the content that should be the target of the link. |
| HtmlLinkArguments | linkArguments | the link attributes such as link text, htmlAttributes, forceAbsolute and forceCanonical |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
PageLink(IHtmlHelper, PageData)
Creates an html anchor to a node by page data.
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PageData page)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| PageData | page | The page that should be the target of the link. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
PageLink(IHtmlHelper, PageData, Object, Object)
Creates an html anchor to a node by page data.
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PageData page, object routeValues, object htmlAttributes)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| PageData | page | The page that should be the target of the link. |
| System.Object | routeValues | The route values |
| System.Object | htmlAttributes | The htmlAttributes |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
PageLink(IHtmlHelper, PageReference)
Creates an html anchor to a node by page link using the name of the page as the link text.
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PageReference pageLink)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| PageReference | pageLink | A reference to the page that should be the target of the link. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
PageLink(IHtmlHelper, PageReference, Object, Object)
Creates an html anchor to a node by page link using the name of the page as the link text.
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PageReference pageLink, object routeValues, object htmlAttributes)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| PageReference | pageLink | A reference to the page that should be the target of the link. |
| System.Object | routeValues | The route values |
| System.Object | htmlAttributes | The html attributes to use in the page link. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
PageLink(IHtmlHelper, PageReference, Object, Object, IContentRepository)
Creates an html anchor to a node by page link using the name of the page as the link text.
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PageReference pageLink, object routeValues, object htmlAttributes, IContentRepository contentRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| PageReference | pageLink | A reference to the page that should be the target of the link. |
| System.Object | routeValues | The route values |
| System.Object | htmlAttributes | The html attributes to use in the page link. |
| IContentRepository | contentRepository | The page repository. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
PageLink(IHtmlHelper, PropertyData)
Creates an html ancor to a node by a property data
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PropertyData propertyData)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | Html helper instance |
| PropertyData | propertyData | Property data to create the html ancor from |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent | HtmlString containing the page link |
PageLink(IHtmlHelper, PropertyData, IContentRepository)
Creates an html ancor to a node by a property data
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PropertyData propertyData, IContentRepository contentRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | Html helper instance |
| PropertyData | propertyData | Property data to create the html ancor from |
| IContentRepository | contentRepository | Data factory instance |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent | HtmlString containing the page link |
PageLink(IHtmlHelper, PropertyPageReference)
Creates an html ancor to a node by a property page reference
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PropertyPageReference propertyData)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | Html helper instance |
| PropertyPageReference | propertyData | Property page reference to create the html ancor from |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent | HtmlString containing the page link |
PageLink(IHtmlHelper, PropertyPageReference, IContentRepository)
Creates an html ancor to a node by a property page reference
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, PropertyPageReference propertyData, IContentRepository contentRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | Html helper instance |
| PropertyPageReference | propertyData | Property page reference to create the html ancor from |
| IContentRepository | contentRepository | Optional page repository instance |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent | HtmlString containing the page link |
PageLink(IHtmlHelper, String, PageReference)
Creates an html anchor to a node by page link.
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, string linkText, PageReference pageLink)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| System.String | linkText | The link text. |
| PageReference | pageLink | A reference to the page that should be the target of the link. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |
PageLink(IHtmlHelper, String, PageReference, Object, Object)
Creates an html anchor to a node by page link.
Declaration
public static IHtmlContent PageLink(this IHtmlHelper htmlHelper, string linkText, PageReference pageLink, object routeValues, object htmlAttributes)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The html helper to attach the extension to. |
| System.String | linkText | The link text. |
| PageReference | pageLink | A reference to the page that should be the target of the link. |
| System.Object | routeValues | The route values |
| System.Object | htmlAttributes | The htmlAttributes |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Html.IHtmlContent |