lowercasing names

This commit is contained in:
Bjarke Berg
2021-02-05 16:32:35 +01:00
parent fb7f4cf55b
commit 39e9daf11a
2 changed files with 16 additions and 4 deletions

View File

@@ -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)
{

View File

@@ -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>