@inject Nop.Services.Html.IHtmlFormatter htmlFormatter @model BlogPostModel @{ Layout = "_ColumnsTwo"; //title NopHtml.AddTitleParts(!string.IsNullOrEmpty(Model.MetaTitle) ? Model.MetaTitle : Model.Title); //meta NopHtml.AddMetaDescriptionParts(Model.MetaDescription); NopHtml.AddMetaKeywordParts(Model.MetaKeywords); //page class NopHtml.AppendPageCssClassParts("html-blogpost-page"); } @section left { @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.LeftSideColumnBlogBefore, additionalData = Model }) @await Component.InvokeAsync(typeof(BlogMonthsViewComponent)) @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.LeftSideColumnAfterBlogArchive, additionalData = Model }) @await Component.InvokeAsync(typeof(BlogTagsViewComponent)) @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.LeftSideColumnBlogAfter, additionalData = Model }) }
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogPostPageTop, additionalData = Model })

@Model.Title

@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogPostPageBeforeBody, additionalData = Model })
@Html.Raw(Model.Body)
@if (Model.Tags.Count > 0) {
    @for (var i = 0; i < Model.Tags.Count; i++) { var tag = Model.Tags[i];
  • @tag
  • if (i != Model.Tags.Count - 1) {
  • ,
  • } }
} @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogPostPageBeforeComments, additionalData = Model }) @if (Model.AllowComments) {
@T("Blog.Comments.LeaveYourComment")
@{ var result = TempData["nop.blog.addcomment.result"] as string; } @if (!string.IsNullOrEmpty(result)) {
@result
}
@if (Model.AddNewComment.DisplayCaptcha) { }
@if (!Model.PreventNotRegisteredUsersToLeaveComments) {
} else {
@T("Blog.Comments.OnlyRegisteredUsersLeaveComments")
}
if (Model.Comments.Count > 0) {
@T("Blog.Comments")
@foreach (var comment in Model.Comments) {
@comment.CreatedOn.ToString("g")
@Html.Raw(htmlFormatter.FormatText(comment.CommentText, false, true, false, false, false, false))
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogPostPageInsideComment, additionalData = comment })
}
} } @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogPostPageAfterComments, additionalData = Model })
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogPostPageBottom, additionalData = Model })