Class StructureHtmlHelperExtensions
Extensions related to page links for System.Web.Mvc.HtmlHelper.
Inheritance
Inherited Members
Namespace: EPiServer.Web.Mvc.Html
Assembly: EPiServer.dll
Version: 7.19.2Syntax
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.Web.Mvc.HtmlHelper | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | 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.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |
ContentLink(HtmlHelper, PropertyContentReference)
Creates an html ancor to a node by a property page reference
Declaration
public static MvcHtmlString ContentLink(this HtmlHelper htmlHelper, PropertyContentReference propertyData)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | htmlHelper | Html helper instance |
PropertyContentReference | propertyData | Property page reference to create the html ancor from |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString | MvcHtmlString containing the page link |
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.Web.Mvc.HtmlHelper | htmlHelper | Html helper instance |
PropertyData | propertyData | Property data to create the html ancor from |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString | 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.Web.Mvc.HtmlHelper | htmlHelper | Html helper instance |
LinkItem | item | Link item to create the html ancor from |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString | 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.Web.Mvc.HtmlHelper | htmlHelper | The html helper to attach the extension to. |
System.String | text | The link text. |
ContentReference | contentLink | A reference to the page that should be the target of the link. |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | htmlHelper | The html helper to attach the extension to. |
System.String | text | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | htmlHelper | The html helper to attach the extension to. |
PageData | page | The page that should be the target of the link. |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |
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
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PageReference pageLink, object routeValues, object htmlAttributes, IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | htmlHelper | Html helper instance |
PropertyData | propertyData | Property data to create the html ancor from |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString | MvcHtmlString containing the page link |
PageLink(HtmlHelper, PropertyData, IContentRepository)
Creates an html ancor to a node by a property data
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PropertyData propertyData, IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | htmlHelper | Html helper instance |
PropertyData | propertyData | Property data to create the html ancor from |
IContentRepository | contentRepository | Data factory instance |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString | 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.Web.Mvc.HtmlHelper | htmlHelper | Html helper instance |
PropertyPageReference | propertyData | Property page reference to create the html ancor from |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString | MvcHtmlString containing the page link |
PageLink(HtmlHelper, PropertyPageReference, IContentRepository)
Creates an html ancor to a node by a property page reference
Declaration
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, PropertyPageReference propertyData, IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | htmlHelper | Html helper instance |
PropertyPageReference | propertyData | Property page reference to create the html ancor from |
IContentRepository | contentRepository | Optional page repository instance |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString | MvcHtmlString containing the page link |
PageLink(HtmlHelper, LinkItem)
Creates an html ancor to a node by a link item
Declaration
[Obsolete("Use Html.ContentLink instead to render LinkItems.")]
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, LinkItem item)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | htmlHelper | Html helper instance |
LinkItem | item | Link item to create the html ancor from |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString | MvcHtmlString containing the page link |
PageLink(HtmlHelper, LinkItem, IPermanentLinkMapper)
Declaration
[Obsolete("Use Html.ContentLink instead to render LinkItems.")]
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, LinkItem item, IPermanentLinkMapper permanentLinkMapper)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | htmlHelper | |
LinkItem | item | |
IPermanentLinkMapper | permanentLinkMapper |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString |
PageLink(HtmlHelper, String, ContentReference, Object, Object, IContentLoader, IPermanentLinkMapper, LanguageSelectorFactory)
Declaration
[Obsolete("Use the overload with without permanent link mapper instead.")]
public static MvcHtmlString PageLink(this HtmlHelper htmlHelper, string text, ContentReference contentLink, object routeValues, object htmlAttributes, IContentLoader contentQueryable, IPermanentLinkMapper permanentLinkMapper, LanguageSelectorFactory languageSelectorFactory)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Mvc.HtmlHelper | htmlHelper | |
System.String | text | |
ContentReference | contentLink | |
System.Object | routeValues | |
System.Object | htmlAttributes | |
IContentLoader | contentQueryable | |
IPermanentLinkMapper | permanentLinkMapper | |
LanguageSelectorFactory | languageSelectorFactory |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | htmlHelper | The html helper to attach the extension to. |
System.String | text | The link text. |
PageReference | pageLink | A reference to the page that should be the target of the link. |
Returns
Type | Description |
---|---|
System.Web.Mvc.MvcHtmlString |
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.Web.Mvc.HtmlHelper | htmlHelper | The html helper to attach the extension to. |
System.String | text | 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 |
---|---|
System.Web.Mvc.MvcHtmlString |