Class StructureHtmlHelperExtensions
Extensions related to page links for System.
Inheritance
Inherited Members
Namespace: EPiServer.Web.Mvc.Html
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
public static class StructureHtmlHelperExtensions
Methods
ContentLink(HtmlHelper, ContentReference)
Creates an html anchor to a node by page link using the name of the page as the link text.
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Content |
contentLink | A reference to the page that should be the target of the link. |
Returns
Type | Description |
---|---|
System. |
ContentLink(HtmlHelper, ContentReference, HtmlLinkArguments)
Creates an html anchor to a node by content link.
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, ContentReference contentLink, HtmlLinkArguments linkArguments)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Content |
contentLink | A reference to the content that should be the target of the link. |
Html |
linkArguments | the link attributes such as link text, htmlAttributes, forceAbsolute and forceCanonical |
Returns
Type | Description |
---|---|
System. |
ContentLink(HtmlHelper, ContentReference, Object, Object)
Creates an html anchor to the specified content.
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, ContentReference contentLink, object routeValues, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Content |
contentLink | The content link. |
System. |
routeValues | The route values |
System. |
htmlAttributes | The htmlAttributes |
Returns
Type | Description |
---|---|
System. |
ContentLink(HtmlHelper, IContent)
Creates an html anchor to the specified content.
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, IContent content)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
IContent | content | The content that should be the target of the link. |
Returns
Type | Description |
---|---|
System. |
ContentLink(HtmlHelper, IContent, Object, Object)
Creates an html anchor to the specified content.
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, IContent content, object routeValues, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
IContent | content | The content that should be the target of the link. |
System. |
routeValues | The route values |
System. |
htmlAttributes | The htmlAttributes |
Returns
Type | Description |
---|---|
System. |
ContentLink(HtmlHelper, PropertyContentReference)
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, PropertyContentReference propertyData)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | |
Property |
propertyData |
Returns
Type | Description |
---|---|
System. |
ContentLink(HtmlHelper, PropertyData)
Creates an html ancor to a node by a property data
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, PropertyData propertyData)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | Html helper instance |
Property |
propertyData | Property data to create the html ancor from |
Returns
Type | Description |
---|---|
System. |
MvcHtmlString containing the page link |
ContentLink(HtmlHelper, LinkItem)
Creates an html ancor to a node by a link item
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, LinkItem item)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | Html helper instance |
Link |
item | Link item to create the html ancor from |
Returns
Type | Description |
---|---|
System. |
MvcHtmlString containing the page link |
ContentLink(HtmlHelper, String, ContentReference)
Creates an html anchor to a node by page link.
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, string text, ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
System. |
text | The link text. |
Content |
contentLink | A reference to the page that should be the target of the link. |
Returns
Type | Description |
---|---|
System. |
ContentLink(HtmlHelper, String, ContentReference, Object, Object)
Creates an html anchor to a node by content link.
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, string text, ContentReference contentLink, object routeValues, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
System. |
text | The link text. |
Content |
contentLink | A reference to the content that should be the target of the link. |
System. |
routeValues | The route values |
System. |
htmlAttributes | The htmlAttributes |
Returns
Type | Description |
---|---|
System. |
PageLink(HtmlHelper, ContentReference, HtmlLinkArguments)
Creates an html anchor to a node by page link.
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, ContentReference contentLink, HtmlLinkArguments linkArguments)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Content |
contentLink | A reference to the content that should be the target of the link. |
Html |
linkArguments | the link attributes such as link text, htmlAttributes, forceAbsolute and forceCanonical |
Returns
Type | Description |
---|---|
System. |
PageLink(HtmlHelper, PageData)
Creates an html anchor to a node by page data.
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PageData page)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Page |
page | The page that should be the target of the link. |
Returns
Type | Description |
---|---|
System. |
PageLink(HtmlHelper, PageData, Object, Object)
Creates an html anchor to a node by page data.
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PageData page, object routeValues, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Page |
page | The page that should be the target of the link. |
System. |
routeValues | The route values |
System. |
htmlAttributes | The htmlAttributes |
Returns
Type | Description |
---|---|
System. |
PageLink(HtmlHelper, PageReference)
Creates an html anchor to a node by page link using the name of the page as the link text.
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Page |
pageLink | A reference to the page that should be the target of the link. |
Returns
Type | Description |
---|---|
System. |
PageLink(HtmlHelper, 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 MvcHtmlString PageLink(this HtmlHelper htmlHelper, PageReference pageLink, object routeValues, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Page |
pageLink | A reference to the page that should be the target of the link. |
System. |
routeValues | The route values |
System. |
htmlAttributes | The html attributes to use in the page link. |
Returns
Type | Description |
---|---|
System. |
PageLink(HtmlHelper, 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
[Obsolete("Use Html.ContentLink instead to render content or use method without IContentRepository dependency.")]
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PageReference pageLink, object routeValues, object htmlAttributes, IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
Page |
pageLink | A reference to the page that should be the target of the link. |
System. |
routeValues | The route values |
System. |
htmlAttributes | The html attributes to use in the page link. |
IContent |
contentRepository | The page repository. |
Returns
Type | Description |
---|---|
System. |
PageLink(HtmlHelper, PropertyData)
Creates an html ancor to a node by a property data
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PropertyData propertyData)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | Html helper instance |
Property |
propertyData | Property data to create the html ancor from |
Returns
Type | Description |
---|---|
System. |
MvcHtmlString containing the page link |
PageLink(HtmlHelper, PropertyData, IContentRepository)
Creates an html ancor to a node by a property data
Declaration
[Obsolete("Use Html.ContentLink instead to render content or use method without IContentRepository dependency.")]
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PropertyData propertyData, IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | Html helper instance |
Property |
propertyData | Property data to create the html ancor from |
IContent |
contentRepository | Data factory instance |
Returns
Type | Description |
---|---|
System. |
MvcHtmlString containing the page link |
PageLink(HtmlHelper, PropertyPageReference)
Creates an html ancor to a node by a property page reference
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PropertyPageReference propertyData)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | Html helper instance |
Property |
propertyData | Property page reference to create the html ancor from |
Returns
Type | Description |
---|---|
System. |
MvcHtmlString containing the page link |
PageLink(HtmlHelper, PropertyPageReference, IContentRepository)
Creates an html ancor to a node by a property page reference
Declaration
[Obsolete("Use Html.ContentLink instead to render content or use method without IContentRepository dependency.")]
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PropertyPageReference propertyData, IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | Html helper instance |
Property |
propertyData | Property page reference to create the html ancor from |
IContent |
contentRepository | Optional page repository instance |
Returns
Type | Description |
---|---|
System. |
MvcHtmlString containing the page link |
PageLink(HtmlHelper, String, PageReference)
Creates an html anchor to a node by page link.
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, string text, PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
System. |
text | The link text. |
Page |
pageLink | A reference to the page that should be the target of the link. |
Returns
Type | Description |
---|---|
System. |
PageLink(HtmlHelper, String, PageReference, Object, Object)
Creates an html anchor to a node by page link.
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, string text, PageReference pageLink, object routeValues, object htmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
System. |
htmlHelper | The html helper to attach the extension to. |
System. |
text | The link text. |
Page |
pageLink | A reference to the page that should be the target of the link. |
System. |
routeValues | The route values |
System. |
htmlAttributes | The htmlAttributes |
Returns
Type | Description |
---|---|
System. |