I have a list of blog posts in Orchard CMS. This is my code:
@{
IEnumerable<object>
blogPosts = Model.ContentItems;
Model.ContentItems.Classes.Add("content-items");
Model.ContentItems.Classes.Add("blog-posts");
}
<div class="row">
@foreach (var item in blogPosts)
{
<div class="col-md-4 col-sm-6">
<div>
<div class="blog-seg post-item seg">
<div>@Display(item)</div>
</div>
</div>
</div>
}
</div>
I want each DIV
to have a link to the post. How can I do this?
@Html.ItemDisplayLink(item)
– Xceno