lowercasing names
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
using System;
|
||||
using Umbraco.Core.Models.Blocks;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Microsoft.AspNetCore.Html;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
using Umbraco.Core.Models.Blocks;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
|
||||
namespace Umbraco.Extensions
|
||||
{
|
||||
public static class BlockListTemplateExtensions
|
||||
{
|
||||
public const string DefaultFolder = "BlockList/";
|
||||
public const string DefaultTemplate = "Default";
|
||||
public const string DefaultFolder = "blocklist/";
|
||||
public const string DefaultTemplate = "default";
|
||||
|
||||
public static IHtmlContent GetBlockListHtml(this HtmlHelper html, BlockListModel model, string template = DefaultTemplate)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage<Umbraco.Core.Models.Blocks.BlockListModel>
|
||||
@{
|
||||
if (!Model.Any()) { return; }
|
||||
}
|
||||
<div class="umb-block-list">
|
||||
@foreach (var block in Model)
|
||||
{
|
||||
if (block?.ContentUdi == null) { continue; }
|
||||
var data = block.Content;
|
||||
@Html.Partial("BlockList/Components/" + data.ContentType.Alias, block)
|
||||
}
|
||||
</div>
|
||||
Reference in New Issue
Block a user