Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

How to enumerate blocks of contentarea in view to render?

$
0
0

How to enumerate blocks of contentarea in view to render? I have block1 and block2 in a contentarea and I want to render them separately unlike @Html.PropertyFor(x => x.CurrentPage.ContentArea).

Rather like below.
e.g.@Html.PropertyFor(block1 of contentarea)
@Html.PropertyFor(block2 of contentarea)

I tried to use Model.CurrentPage.ContentArea.Items.OfType<EPiServer.Core.BlockData>(). But how to use this in view?


Viewing all articles
Browse latest Browse all 9076

Trending Articles