Webiant Logo Webiant Logo
  1. No results found.

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

List.cshtml

@model BlogPostListModel

@using Nop.Core.Domain.Blogs

@{
    Layout = "_ColumnsTwo";

    //title
    NopHtml.AddTitleParts(T("PageTitle.Blog").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-blog-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 })
}
@T("Blog.RSS")

@if (string.IsNullOrEmpty(Model.PagingFilteringContext.Tag)) { if (Model.PagingFilteringContext.GetParsedMonth().HasValue) { @string.Format(T("Blog.FilteredByMonth").Text, Model.PagingFilteringContext.GetParsedMonth().Value.Year, Model.PagingFilteringContext.GetParsedMonth().Value.ToString("MMMM")) } else { @T("Blog") } } else { @string.Format(T("Blog.TaggedWith").Text, Model.PagingFilteringContext.Tag) }

@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogListPageBeforePosts, additionalData = Model })
@foreach (var item in Model.BlogPosts) { @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogListPageBeforePost, additionalData = item })
@item.Title
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogListPageBeforePostBody, additionalData = item })
@Html.Raw(!string.IsNullOrEmpty(item.BodyOverview) ? item.BodyOverview : item.Body)
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogListPageAfterPostBody, additionalData = item })
@if (item.Tags.Count > 0) {
    @for (var i = 0; i < item.Tags.Count; i++) { var tag = item.Tags[i];
  • @tag
  • if (i != item.Tags.Count - 1) {
  • ,
  • } }
}
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogListPageInsidePost, additionalData = item })
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogListPageAfterPost, additionalData = item }) }
@{ var pager = Html.Pager(Model.PagingFilteringContext).QueryParam("pagenumber"); } @if (!(await pager.IsEmpty())) {
@pager
} @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.BlogListPageAfterPosts, additionalData = Model })