Search Results for

    Show / Hide Table of Contents
    View Source

    Class BlockGridTemplateExtensions

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Web.Common.dll
    Syntax
    public static class BlockGridTemplateExtensions

    Fields

    View Source

    DefaultFolder

    Declaration
    public const string DefaultFolder = "blockgrid/"
    Field Value
    Type Description
    System.String
    View Source

    DefaultItemAreasTemplate

    Declaration
    public const string DefaultItemAreasTemplate = "areas"
    Field Value
    Type Description
    System.String
    View Source

    DefaultItemAreaTemplate

    Declaration
    public const string DefaultItemAreaTemplate = "area"
    Field Value
    Type Description
    System.String
    View Source

    DefaultItemsTemplate

    Declaration
    public const string DefaultItemsTemplate = "items"
    Field Value
    Type Description
    System.String
    View Source

    DefaultTemplate

    Declaration
    public const string DefaultTemplate = "default"
    Field Value
    Type Description
    System.String

    Methods

    View Source

    GetBlockGridHtml(IHtmlHelper, IPublishedContent, String)

    Declaration
    public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    IPublishedContent contentItem
    System.String propertyAlias
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    View Source

    GetBlockGridHtml(IHtmlHelper, IPublishedContent, String, String)

    Declaration
    public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    IPublishedContent contentItem
    System.String propertyAlias
    System.String template
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    View Source

    GetBlockGridHtml(IHtmlHelper, IPublishedProperty, String)

    Declaration
    public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, IPublishedProperty property, string template = "default")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    IPublishedProperty property
    System.String template
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    View Source

    GetBlockGridHtml(IHtmlHelper, Nullable<BlockGridModel>, String)

    Declaration
    public static IHtmlContent GetBlockGridHtml(this IHtmlHelper html, BlockGridModel? model, string template = "default")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    System.Nullable<BlockGridModel> model
    System.String template
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    View Source

    GetBlockGridHtmlAsync(IHtmlHelper, IPublishedContent, String)

    Declaration
    public static async Task<IHtmlContent> GetBlockGridHtmlAsync(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    IPublishedContent contentItem
    System.String propertyAlias
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Html.IHtmlContent>
    View Source

    GetBlockGridHtmlAsync(IHtmlHelper, IPublishedContent, String, String)

    Declaration
    public static async Task<IHtmlContent> GetBlockGridHtmlAsync(this IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    IPublishedContent contentItem
    System.String propertyAlias
    System.String template
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Html.IHtmlContent>
    View Source

    GetBlockGridHtmlAsync(IHtmlHelper, IPublishedProperty, String)

    Declaration
    public static async Task<IHtmlContent> GetBlockGridHtmlAsync(this IHtmlHelper html, IPublishedProperty property, string template = "default")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    IPublishedProperty property
    System.String template
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Html.IHtmlContent>
    View Source

    GetBlockGridHtmlAsync(IHtmlHelper, Nullable<BlockGridModel>, String)

    Renders a block grid model into a grid layout

    Declaration
    public static async Task<IHtmlContent> GetBlockGridHtmlAsync(this IHtmlHelper html, BlockGridModel? model, string template = "default")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    System.Nullable<BlockGridModel> model
    System.String template
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Html.IHtmlContent>
    Remarks

    By default this method uses a set of built-in partial views for rendering the blocks and areas in the grid model. These partial views are embedded in the static assets (Umbraco.Cms.StaticAssets), so they won't show up in the Views folder on your local disk.

    If you need to tweak the grid rendering output, you can copy the partial views from GitHub to your local disk. The partial views are found in "/src/Umbraco.Cms.StaticAssets/Views/Partials/blockgrid/" on GitHub and should be copied to "Views/Partials/BlockGrid/" on your local disk.

    View Source

    GetBlockGridItemAreaHtml(IHtmlHelper, BlockGridArea, String)

    Declaration
    public static IHtmlContent GetBlockGridItemAreaHtml(this IHtmlHelper html, BlockGridArea area, string template = "area")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    BlockGridArea area
    System.String template
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    View Source

    GetBlockGridItemAreaHtml(IHtmlHelper, BlockGridItem, String, String)

    Declaration
    public static IHtmlContent GetBlockGridItemAreaHtml(this IHtmlHelper html, BlockGridItem item, string areaAlias, string template = "area")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    BlockGridItem item
    System.String areaAlias
    System.String template
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    View Source

    GetBlockGridItemAreaHtmlAsync(IHtmlHelper, BlockGridArea, String)

    Declaration
    public static async Task<IHtmlContent> GetBlockGridItemAreaHtmlAsync(this IHtmlHelper html, BlockGridArea area, string template = "area")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    BlockGridArea area
    System.String template
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Html.IHtmlContent>
    View Source

    GetBlockGridItemAreaHtmlAsync(IHtmlHelper, BlockGridItem, String, String)

    Declaration
    public static async Task<IHtmlContent> GetBlockGridItemAreaHtmlAsync(this IHtmlHelper html, BlockGridItem item, string areaAlias, string template = "area")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    BlockGridItem item
    System.String areaAlias
    System.String template
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Html.IHtmlContent>
    View Source

    GetBlockGridItemAreasHtml(IHtmlHelper, BlockGridItem, String)

    Declaration
    public static IHtmlContent GetBlockGridItemAreasHtml(this IHtmlHelper html, BlockGridItem item, string template = "areas")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    BlockGridItem item
    System.String template
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    View Source

    GetBlockGridItemAreasHtmlAsync(IHtmlHelper, BlockGridItem, String)

    Declaration
    public static async Task<IHtmlContent> GetBlockGridItemAreasHtmlAsync(this IHtmlHelper html, BlockGridItem item, string template = "areas")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    BlockGridItem item
    System.String template
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Html.IHtmlContent>
    View Source

    GetBlockGridItemsHtml(IHtmlHelper, IEnumerable<BlockGridItem>, String)

    Declaration
    public static IHtmlContent GetBlockGridItemsHtml(this IHtmlHelper html, IEnumerable<BlockGridItem> items, string template = "items")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    IEnumerable<BlockGridItem> items
    System.String template
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent
    View Source

    GetBlockGridItemsHtmlAsync(IHtmlHelper, IEnumerable<BlockGridItem>, String)

    Declaration
    public static async Task<IHtmlContent> GetBlockGridItemsHtmlAsync(this IHtmlHelper html, IEnumerable<BlockGridItem> items, string template = "items")
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html
    IEnumerable<BlockGridItem> items
    System.String template
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Html.IHtmlContent>
    • Improve this Doc
    • View Source
    In This Article
    • Fields
      • DefaultFolder
      • DefaultItemAreasTemplate
      • DefaultItemAreaTemplate
      • DefaultItemsTemplate
      • DefaultTemplate
    • Methods
      • GetBlockGridHtml(IHtmlHelper, IPublishedContent, String)
      • GetBlockGridHtml(IHtmlHelper, IPublishedContent, String, String)
      • GetBlockGridHtml(IHtmlHelper, IPublishedProperty, String)
      • GetBlockGridHtml(IHtmlHelper, Nullable<BlockGridModel>, String)
      • GetBlockGridHtmlAsync(IHtmlHelper, IPublishedContent, String)
      • GetBlockGridHtmlAsync(IHtmlHelper, IPublishedContent, String, String)
      • GetBlockGridHtmlAsync(IHtmlHelper, IPublishedProperty, String)
      • GetBlockGridHtmlAsync(IHtmlHelper, Nullable<BlockGridModel>, String)
      • GetBlockGridItemAreaHtml(IHtmlHelper, BlockGridArea, String)
      • GetBlockGridItemAreaHtml(IHtmlHelper, BlockGridItem, String, String)
      • GetBlockGridItemAreaHtmlAsync(IHtmlHelper, BlockGridArea, String)
      • GetBlockGridItemAreaHtmlAsync(IHtmlHelper, BlockGridItem, String, String)
      • GetBlockGridItemAreasHtml(IHtmlHelper, BlockGridItem, String)
      • GetBlockGridItemAreasHtmlAsync(IHtmlHelper, BlockGridItem, String)
      • GetBlockGridItemsHtml(IHtmlHelper, IEnumerable<BlockGridItem>, String)
      • GetBlockGridItemsHtmlAsync(IHtmlHelper, IEnumerable<BlockGridItem>, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX