Imported data not display

懵懂的女人 提交于 2019-12-25 16:59:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!