@model SitemapModel
@using Nop.Web.Models.Catalog
@using Nop.Web.Models.Common
@using Nop.Web.Models.Topics
@using Nop.Web.Framework.UI;
@{
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Sitemap").Text);
}
<div class="sitemap-page">
    <div class="page-title">
        <h1>@T("Sitemap")</h1>
    </div>
    @if (Model.Topics.Count > 0)
    {
        <div class="entity">
            @*TODO Specify width 100% for datalist (pass htmlattributes)*@
            @(Html.DataList<TopicModel>(Model.Topics, 4,
                @<div class="topic-box">
                    <div class="item">
                        <a href="@Url.RouteUrl("Topic", new { SystemName = @item.SystemName.ToLowerInvariant() })">@item.Title</a>
                    </div>
                </div>
            ))
        </div>
        <div class="clear">
        </div>
    }
    @if (Model.Categories.Count > 0)
    {
        <div class="entity">
            <h2>
                @T("Sitemap.Categories")</h2>
            @(Html.DataList<CategoryModel>(Model.Categories, 4,
                @<div class="category-box">
                    <div class="item">
                        <a href="@Url.RouteUrl("Category", new { categoryId = item.Id, SeName = item.SeName })">@item.Name</a>
                    </div>
                </div>
            ))
        </div>
        <div class="clear">
        </div>
    }
    @if (Model.Manufacturers.Count > 0)
    {
        <div class="entity">
            <h2>
                @T("Sitemap.Manufacturers")</h2>
            @(Html.DataList<ManufacturerModel>(Model.Manufacturers, 4,
                @<div class="manufacturer-box">
                    <div class="item">
                        <a href="@Url.RouteUrl("Manufacturer", new { manufacturerId = item.Id, SeName = item.SeName })">@item.Name</a>
                    </div>
                </div>
            ))
        </div>
        <div class="clear">
        </div>
    }
    @if (Model.Products.Count > 0)
    {
        <div class="entity">
            <h2>
                @T("Sitemap.Products")</h2>
            @(Html.DataList<ProductModel>(Model.Products, 4,
                @<div class="product-box">
                    <div class="item">
                        <a href="@Url.RouteUrl("Product", new { productId = item.Id, SeName = item.SeName })">@item.Name</a>
                    </div>
                </div>
            ))
        </div>
    }
</div>
