下面是案例展示的Detail.cshtml,请问在哪个位置添加呢?需要添加什么内容呢?
@{
int columnId = Html.CurrentColumnId();
dynamic infoData = Html.InfoData();
dynamic prevData = Html.InfoDataPrevious(null, "columnid=@columnId", new { columnId = columnId });
dynamic nextData = Html.InfoDataNext(null, "columnid=@columnId", new { columnId = columnId });
string templateDirectory = ViewBag.TemplateDirectory;
}
@Html.Partial("BannerPartial")
<div class="main">
@Html.Partial("BreadcrumbPartial")
<div class="container" style="padding: 30px 20px;">
<div class="info-content newsdetails">
<h4 class="text-center line-height-3">@infoData.Title</h4>
<div class="text-center">
<span title="发布时间" class="margin-right-20">发布时间: @infoData.Thedate.ToString("yyyy-MM-dd")</span>
<span title="点击数"><span id="lb_clicks">0</span> 次浏览</span>
</div>
<div class="padding-top-20" id="Content">
<div class="intro">
@infoData.Introduction
</div>
<!--图片组-->
@Html.Partial("DetailImagesModel", Html.AttachmentDataList(new { ParentTable = "cases", ParentField = "images", ParentId = (int)infoData.Id }))
</div>
@Html.Raw(infoData.Content)
</div>
<div class="clearFix padding-top-20 line-height-2">
<ul>
@if (prevData != null)
{
string url = Html.InfoDataUrl((int)prevData.ColumnId, (int)prevData.Id);
<li style="color
595959;">上一篇:<a href="@url">@prevData.Title</a></li>
}
@if (nextData != null)
{
string url = Html.InfoDataUrl((int)nextData.ColumnId, (int)nextData.Id);
<li style="color
595959;">下一篇:<a href="@url">@nextData.Title</a></li>
}
</ul>
</div>
</div>
</div>
<script type="text/javascript">
var $lb_clicks = $("#lb_clicks");
$.post("/E/InfoData/AddClicks", { ColumnId
infoData.ColumnId,Id
infoData.Id}, function (data) { $lb_clicks.text(data)})
</script>