Skip to content

Commit d4d41bf

Browse files
Bump to Umbraco 16.0.0-rc5
1 parent 1ffbd29 commit d4d41bf

File tree

12 files changed

+539
-545
lines changed

12 files changed

+539
-545
lines changed

src/Umbraco.Cms.16.x/Umbraco.Cms.16.x.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Umbraco.Cms" Version="16.0.0-rc4" />
11-
<PackageReference Include="Umbraco.Cms.Core" Version="16.0.0-rc4" />
12-
<PackageReference Include="Umbraco.Cms.StaticAssets" Version="16.0.0-rc4" />
10+
<PackageReference Include="Umbraco.Cms" Version="16.0.0-rc5" />
11+
<PackageReference Include="Umbraco.Cms.Core" Version="16.0.0-rc5" />
12+
<PackageReference Include="Umbraco.Cms.StaticAssets" Version="16.0.0-rc5" />
1313
<PackageReference Include="uSync" Version="16.0.0-rc2" />
1414
</ItemGroup>
1515

src/Umbraco.Cms.16.x/Views/Partials/blockgrid/Components/cardBlock.cshtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
@using System.Text.Json
22
@inherits UmbracoViewPage<BlockGridItem<CardBlock>>
33

4-
<pre>Block Index: @ViewData["blockIndex"]</pre>
5-
64
<div class="card @(Model.ColumnSpan == 6 ? "--medium" : null)">
75

86
<div class="card-media">

src/Umbraco.Cms.16.x/Views/Partials/blockgrid/Components/heroBlock.cshtml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
var hasBrightContrast = Model.Content.Contrast == "#ffffff";
66
}
77

8-
@* <pre>Dropdown: @Model.Content.Height</pre> *@
9-
@* <pre>Content Picker: @Model.Content.ContentPicker?.Name (@Model.Content.ContentPicker?.Url())</pre> *@
10-
<pre>MNTP: @Model.Content.Mntp?.Name() (@Model.Content.Mntp?.Id)</pre>
11-
@* <pre>MNTP: @(string.Join(", ", Model.Content.Mntp.Select(x => x.Name))) (@(string.Join(", ", Model.Content.Mntp.Select(x => x.Id))))</pre> *@
12-
@* <pre>Settings Dropdown: @Model.Settings?.Dropdown</pre> *@
13-
148
<div
159
class="hero"
1610
style="background-color:@backgroundColor"

src/Umbraco.Cms.16.x/Views/Partials/blockgrid/items.cshtml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
1-
@inherits UmbracoViewPage<IEnumerable<BlockGridItem>>
1+
@inject Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector Selector
2+
@inherits UmbracoViewPage<IEnumerable<BlockGridItem>>
23
@{
34
if (Model?.Any() != true) { return; }
45
}
56

67
<div class="umb-block-grid__layout-container">
78
@foreach (var item in Model)
8-
{
9-
<div
10-
class="umb-block-grid__layout-item"
11-
data-content-element-type-alias="@item.Content.ContentType.Alias"
12-
data-content-element-type-key="@item.Content.ContentType.Key"
13-
data-element-udi="@item.ContentUdi"
14-
data-col-span="@item.ColumnSpan"
15-
data-row-span="@item.RowSpan"
16-
style=" --umb-block-grid--item-column-span: @item.ColumnSpan; --umb-block-grid--item-row-span: @item.RowSpan; ">
9+
{
10+
<div class="umb-block-grid__layout-item"
11+
data-content-element-type-alias="@item.Content.ContentType.Alias"
12+
data-content-element-type-key="@item.Content.ContentType.Key"
13+
data-element-udi="@item.ContentUdi"
14+
data-col-span="@item.ColumnSpan"
15+
data-row-span="@item.RowSpan"
16+
style=" --umb-block-grid--item-column-span: @item.ColumnSpan; --umb-block-grid--item-row-span: @item.RowSpan; ">
1717
@{
18-
var partialViewName = "blockgrid/Components/" + item.Content.ContentType.Alias;
19-
try
18+
var viewAlias = item.Content.ContentType.Alias.ToFirstUpper();
19+
var viewComponent = Selector.SelectComponent(viewAlias);
20+
if (viewComponent != null)
2021
{
21-
@await Html.PartialAsync(partialViewName, item)
22+
@await Component.InvokeAsync(viewComponent.TypeInfo.AsType(), item)
2223
}
23-
catch (InvalidOperationException)
24+
else
2425
{
25-
<p>
26-
<strong>Could not render component of type: @(item.Content.ContentType.Alias)</strong>
27-
<br/>
28-
This likely happened because the partial view <em>@partialViewName</em> could not be found.
29-
</p>
26+
var partialViewName = "blockgrid/Components/" + item.Content.ContentType.Alias;
27+
try
28+
{
29+
@await Html.PartialAsync(partialViewName, item)
30+
}
31+
catch (InvalidOperationException)
32+
{
33+
<p>
34+
<strong>Could not render component of type: @(item.Content.ContentType.Alias)</strong>
35+
<br />
36+
This likely happened because the partial view <em>@partialViewName</em> could not be found.
37+
</p>
38+
}
3039
}
3140
}
3241
</div>

src/Umbraco.Cms.16.x/Views/Partials/blocklist/Components/heroBlock.cshtml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
var hasBrightContrast = Model.Content.Contrast == "#ffffff";
66
}
77

8-
<pre>Dropdown: @Model.Content.Height</pre>
9-
<pre>Content Picker: @Model.Content.ContentPicker?.Name (@Model.Content.ContentPicker?.Url())</pre>
10-
118
<div
129
class="hero"
1310
style="background-color:@backgroundColor"

src/Umbraco.Cms.16.x/Views/Partials/richtext/Components/heroBlock.cshtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
var hasBrightContrast = Model.Content.Contrast == "#ffffff";
66
}
77

8-
<pre>Dropdown: @Model.Content.Height</pre>
9-
<pre>Content Picker: @Model.Content.ContentPicker?.Name (@Model.Content.ContentPicker?.Url())</pre>
108

119
<div
1210
class="hero"

0 commit comments

Comments
 (0)