EPiServer

FilteredContents gets enumerable from ContentArea items

Posted on Updated on

FilteredContents will do the job.

@foreach (var tag in Model.CurrentPage.AreasOfUse.FilteredContents.OfType<AreaOfUseBlock>())
{
   @Html.PageLink(tag)
}

Source: http://joelabrahamsson.com/custom-rendering-of-content-areas/

Advertisements