@{
int columnId = Html.CurrentColumnId();//获取当前栏目id
PageInfo pageInfo = new PageInfo()
{
PageSize = 10,//每页显示10条数据
CurrentPage = (int)ViewBag.CurrentPage //当前页码,系统预设
};
string templateDirectory = ViewBag.TemplateDirectory;
}
@Html.Partial("bannerPartial")
<div class="container page-aboutus">
@Html.Partial("leftNavPartial")
@Html.Partial("BreadcrumbPartial")
<div class="page-com-tit">
@Html.GetColumnList().Where(c => c.Id == columnId).FirstOrDefault().Name
</div>
<ul class="m-newslist">
@foreach (var item in Html.InfoDataList( new { ColumnId = Html.CurrentColumnId() }, null, null, pageInfo))
{
string url = Html.InfoDataUrl((int)item.ColumnId, (int)item.Id);
string date = item.Thedate.ToString("yyyy-MM-dd");
string title = item.Title;
if (title.Length > 20)
{
title = title.Substring(0, 20) + "...";
}
<li>
<a class="tit" href="@url">@title</a>
<div class="date">
@date
</div>
</li>
}
</ul>
@Html.Partial("PagebreakPartial", pageInfo)
</div>