我新建了一个ColumnPartial.cshtmll模板,想调用 "pa_column_content_set"里的"images"字段,代码如下:
为什么不成功呢? 我在_layout_1.cshtml母版里加载了 @Html.Partial("ColumnPartial")
<div class="swiper-container banner" id="banner">
<div class="swiper-wrapper">
@foreach(var item in Html.AttachmentDataList(new {ParentTable = "pa_column_content_set", ParentField = "images", ParentId = Html.CurrentColumnId() }))
{
<div class="swiper-slide"><img src="@item.Path"></div>
}
</div>