C# Класс Alloy.Helpers.HtmlHelpers

Показать файл Открыть проект

Открытые методы

Метод Описание
BeginConditionalLink ( this helper, bool shouldWriteLink, Func urlGetter, string title = null, string cssClass = null ) : ConditionalLink

Writes an opening ]]> tag to the response if the shouldWriteLink argument is true. Returns a ConditionalLink object which when disposed will write a closing ]]> tag to the response if the shouldWriteLink argument is true.

Overload which only executes the delegate for retrieving the URL if the link should be written. This may be used to prevent null reference exceptions by adding null checkes to the shouldWriteLink condition.

BeginConditionalLink ( this helper, bool shouldWriteLink, IHtmlString url, string title = null, string cssClass = null ) : ConditionalLink

Writes an opening ]]> tag to the response if the shouldWriteLink argument is true. Returns a ConditionalLink object which when disposed will write a closing ]]> tag to the response if the shouldWriteLink argument is true.

MenuList ( this helper, EPiServer.Core.ContentReference rootLink, HelperResult>.Func itemTemplate = null, bool includeRoot = false, bool requireVisibleInMenu = true, bool requirePageTemplate = true ) : IHtmlString

Returns an element for each child page of the rootLink using the itemTemplate.

Filter by access rights and publication status.

Приватные методы

Метод Описание
CreateMenuItem ( System.PageData page, EPiServer.Core.ContentReference currentContentLink, List pagePath, IContentLoader contentLoader, Func filter ) : MenuItem
GetDefaultItemTemplate ( HtmlHelper helper ) : HelperResult>.Func

Описание методов

BeginConditionalLink() публичный статический Метод

Writes an opening ]]> tag to the response if the shouldWriteLink argument is true. Returns a ConditionalLink object which when disposed will write a closing ]]> tag to the response if the shouldWriteLink argument is true.
Overload which only executes the delegate for retrieving the URL if the link should be written. This may be used to prevent null reference exceptions by adding null checkes to the shouldWriteLink condition.
public static BeginConditionalLink ( this helper, bool shouldWriteLink, Func urlGetter, string title = null, string cssClass = null ) : ConditionalLink
helper this
shouldWriteLink bool
urlGetter Func
title string
cssClass string
Результат ConditionalLink

BeginConditionalLink() публичный статический Метод

Writes an opening ]]> tag to the response if the shouldWriteLink argument is true. Returns a ConditionalLink object which when disposed will write a closing ]]> tag to the response if the shouldWriteLink argument is true.
public static BeginConditionalLink ( this helper, bool shouldWriteLink, IHtmlString url, string title = null, string cssClass = null ) : ConditionalLink
helper this
shouldWriteLink bool
url IHtmlString
title string
cssClass string
Результат ConditionalLink

MenuList() публичный статический Метод

Returns an element for each child page of the rootLink using the itemTemplate.
Filter by access rights and publication status.
public static MenuList ( this helper, EPiServer.Core.ContentReference rootLink, HelperResult>.Func itemTemplate = null, bool includeRoot = false, bool requireVisibleInMenu = true, bool requirePageTemplate = true ) : IHtmlString
helper this The html helper in whose context the list should be created
rootLink EPiServer.Core.ContentReference A reference to the root whose children should be listed
itemTemplate HelperResult>.Func A template for each page which will be used to produce the return value. Can be either a delegate or a Razor helper.
includeRoot bool Wether an element for the root page should be returned
requireVisibleInMenu bool Wether pages that do not have the "Display in navigation" checkbox checked should be excluded
requirePageTemplate bool Wether page that do not have a template (i.e. container pages) should be excluded
Результат IHtmlString