PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

ColumnIds无法调用多个栏目数据 [复制链接]

1#
用Table和ColumnId可以正常读取的数据用ColumnIds就无法读取了前端显示的是空白,是不是我写错了?

[code]
    <div class="right_side">
      <div id="content">
        @foreach (var item in Html.InfoDataList(new { ColumnIds = "203,204", OrderBy = "thedate desc" }, null, null, pageInfo))
        {
            string url = Html.InfoDataUrl((int)item.ColumnId, (int)item.Id);
            var intro = item.Intro;    //获取自定义简介
            string lmmc = Html.ColumnName((int)item.ColumnId);    //获取栏目名称
        <!--news_list-->
        <div class="news_list">
          <div class="pic" style="background:url(@(item.Thumbnail)) no-repeat center center; background-size:100%;"><a href="@url" target="_blank"></a></div>
          <ul>
            <li>
              <h3><a href="@url" target="_blank">@item.Title</a></h3>
            </li>
            <li>@lmmc  —  @item.Thedate.ToString("yyyy-MM-dd")</li>
            <li>@intro<a href="@url" target="_blank">查看全文</a></li>
          </ul>
        </div>
        <!--news_list-->
       }
        
        <!--news_list-->
        
      </div>
      <div class="pagess">
        <ul>
         @Html.Partial("PagebreakPartial", pageInfo)
        </ul>
        </div>
    </div>
[/code]
分享 转发
TOP
发新话题 回复该主题