我正在尝试从标题模板访问“注释”部分 从可路由的标题temp
@{
Orchard.ContentManagement.ContentItem contentItem = Model.ContentPart.ContentItem;
string title = Model.Title.ToString();
}
<h1 class="title">@Html.ItemDisplayLink(title, contentItem)</h1>
<h3>Posted by
<a href="#">Kevin</a> with ## HOW DO I GET AT THE COMMENT COUNT? ## Comments
</h3>
答案 0 :(得分:2)
Model.ContentPart.ContentItem.CommentsPart.Comments.Count
应该做我认为的伎俩。