View Source
Class SingleBlockTemplateExtensions
Assembly: Umbraco.Web.Common.dll
Syntax
public static class SingleBlockTemplateExtensions
Fields
View Source
DefaultFolder
Declaration
public const string DefaultFolder = "singleblock/"
Field Value
View Source
DefaultTemplate
Declaration
public const string DefaultTemplate = "default"
Field Value
Methods
View Source
GetBlockHtml(IHtmlHelper, BlockListItem?, string)
Declaration
public static IHtmlContent GetBlockHtml(this IHtmlHelper html, BlockListItem? model, string template = "default")
Parameters
| Type |
Name |
Description |
| IHtmlHelper |
html |
|
| BlockListItem |
model |
|
| string |
template |
|
Returns
| Type |
Description |
| IHtmlContent |
|
View Source
GetBlockHtml(IHtmlHelper, IPublishedContent, string)
Declaration
public static IHtmlContent GetBlockHtml(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias)
Parameters
| Type |
Name |
Description |
| IHtmlHelper |
html |
|
| IPublishedContent |
contentItem |
|
| string |
propertyAlias |
|
Returns
| Type |
Description |
| IHtmlContent |
|
View Source
GetBlockHtml(IHtmlHelper, IPublishedContent, string, string)
Declaration
public static IHtmlContent GetBlockHtml(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template)
Parameters
| Type |
Name |
Description |
| IHtmlHelper |
html |
|
| IPublishedContent |
contentItem |
|
| string |
propertyAlias |
|
| string |
template |
|
Returns
| Type |
Description |
| IHtmlContent |
|
View Source
GetBlockHtml(IHtmlHelper, IPublishedProperty, string)
Declaration
public static IHtmlContent GetBlockHtml(this IHtmlHelper html, IPublishedProperty property, string template = "default")
Parameters
Returns
| Type |
Description |
| IHtmlContent |
|
View Source
GetBlockHtmlAsync(IHtmlHelper, BlockListItem?, string)
Declaration
public static Task<IHtmlContent> GetBlockHtmlAsync(this IHtmlHelper html, BlockListItem? model, string template = "default")
Parameters
| Type |
Name |
Description |
| IHtmlHelper |
html |
|
| BlockListItem |
model |
|
| string |
template |
|
Returns
| Type |
Description |
| Task<IHtmlContent> |
|
View Source
GetBlockHtmlAsync(IHtmlHelper, IPublishedContent, string)
Declaration
public static Task<IHtmlContent> GetBlockHtmlAsync(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias)
Parameters
| Type |
Name |
Description |
| IHtmlHelper |
html |
|
| IPublishedContent |
contentItem |
|
| string |
propertyAlias |
|
Returns
| Type |
Description |
| Task<IHtmlContent> |
|
View Source
GetBlockHtmlAsync(IHtmlHelper, IPublishedContent, string, string)
Declaration
public static Task<IHtmlContent> GetBlockHtmlAsync(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template)
Parameters
| Type |
Name |
Description |
| IHtmlHelper |
html |
|
| IPublishedContent |
contentItem |
|
| string |
propertyAlias |
|
| string |
template |
|
Returns
| Type |
Description |
| Task<IHtmlContent> |
|
View Source
GetBlockHtmlAsync(IHtmlHelper, IPublishedProperty, string)
Declaration
public static Task<IHtmlContent> GetBlockHtmlAsync(this IHtmlHelper html, IPublishedProperty property, string template = "default")
Parameters
Returns
| Type |
Description |
| Task<IHtmlContent> |
|
View Source
SingleBlockPartialWithFallback(IHtmlHelper, string, string)
Declaration
public static string SingleBlockPartialWithFallback(this IHtmlHelper html, string template, string fallbackTemplate)
Parameters
| Type |
Name |
Description |
| IHtmlHelper |
html |
|
| string |
template |
|
| string |
fallbackTemplate |
|
Returns