问题
Imported data not displays in repeated table. It's only shows demo data. below is my template.
@{
<table class="table table-striped table-bordered">
<tbody>
@foreach (var Content in AsDynamic(Data["Default"]).OrderBy(m => m.wcName))
{
<tr>
<td width="30%"><a href="@Content.link" target="_blank">@Content.wcName</a> </td>
<td>@Html.Raw(@Content.wcPosition)
@if (DotNetNuke.Common.Globals.IsEditMode())
{
@Content.Toolbar
}
</td>
</tr>
}
</tbody>
</table>
}
回答1:
Your template only shows items assigned to this page/module, not "all data" - for that you would have to replace Data["Default"]
with App.Data["your-content-type-name"]
.
You probably want to read more about this here: http://2sxc.org/en/blog/post/12-differences-when-templating-data-instead-of-content
来源:https://stackoverflow.com/questions/41956563/imported-data-not-display