Webiant Logo Webiant Logo
  1. No results found.

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

Default.cshtml

@model IList<BlogPostYearModel>
@if (Model.Count > 0)
{
    <section class="block block-blog-archive">
        <h2 class="title">
            @T("Blog.Archive")
        </h2>
        <div class="listbox">
            <ul class="list" id="blog-month-list">
                @foreach (var yearItem in Model)
                {
                    <li class="year">
                        <strong class="number">@(yearItem.Year)</strong>
                        <ul class="sublist" id="blog-year-@(yearItem.Year)">
                            @foreach (var monthItem in yearItem.Months)
                            {
                                <li class="month">
                                    <a href="@Url.RouteUrl(NopRouteNames.Standard.BLOG_BY_MONTH, new { month = yearItem.Year + "-" + monthItem.Month })">@(new DateTime(yearItem.Year, monthItem.Month, 1).ToString("MMMM"))
                                    (@(monthItem.BlogPostCount))</a>
                                </li>
                            }
                        </ul>
                    </li>
                }
            </ul>
        </div>
    </section>
}