Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

NewsItem.cshtml

@inject Nop.Services.Html.IHtmlFormatter htmlFormatter
@model NewsItemModel
@{
    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-news-item-page");
}

@Model.Title

@Model.CreatedOn.ToString("D")
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.NewsItemPageBeforeBody, additionalData = Model })
@Html.Raw(Model.Full)
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.NewsItemPageBeforeComments, additionalData = Model }) @if (Model.AllowComments) {
@T("News.Comments.LeaveYourComment")
@{ var result = TempData["nop.news.addcomment.result"] as string; } @if (!string.IsNullOrEmpty(result)) {
@result
}
@if (Model.AddNewComment.DisplayCaptcha) { }
@if (!Model.PreventNotRegisteredUsersToLeaveComments) {
} else {
@T("News.Comments.OnlyRegisteredUsersLeaveComments")
}
if (Model.Comments.Count > 0) {
@T("News.Comments")
@foreach (var comment in Model.Comments) {
@comment.CreatedOn.ToString("g")
@comment.CommentTitle

@Html.Raw(htmlFormatter.FormatText(comment.CommentText, false, true, false, false, false, false))

@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.NewsItemPageInsideComment, additionalData = comment })
}
} } @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.NewsItemPageAfterComments, additionalData = Model })