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

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

热门文章调用 isHot没有用呀 [复制链接]

1#
下面代码中的    {Table="article" , ColumnIds = "201,202,203", ShowNumber = 20, OrderBy = "isHot" }))这里不管我怎么设置  {Table="article" , ColumnIds = "201,202,203", ShowNumber = 20, isHot="1" }))这个排序我试过好几种方式但是都没用,不知道为什么单纯只有isHot="1"这个没有OrderBy这个排序的就不行,默认时间排序了,带上OrderBy = "isHot"这样的又只能显示全部,我设置的热门显示不出来,也不知道为什么虽然排序不是按照最新发布来了,希望大神能教下谢谢了
<div class="m-columnlist margin-top-30 wow  animated fadeInUp">
        <div class="column-tit">
            热门文章
        </div>

        <ul class="mknc_zybk_box">
            @foreach (dynamic item in Html.InfoDataList(new {Table="article" , ColumnIds = "201,202,203", ShowNumber = 20, OrderBy = "isHot", isHot="1" }))
            {
                idx++;
                string url = Html.InfoDataUrl((int)item.ColumnId, (int)item.Id);
                string thumbnail = item.Thumbnail;
                if (idx <= 3)
                {
                    <li class="clearFix">
                        <span class="r float-left span-1">@idx</span>
                        <a href="@url" target="_self" class="float-left" title="@item.Title">@item.Title</a>
                    </li>
                }
                else
                {
                    <li class="clearFix">
                        <span class="r float-left">@idx</span>
                        <a href="@url" target="_self" class="float-left" title="@item.Title">@item.Title</a>
                    </li>
                }


            }
        </ul>
    </div>
分享 转发
TOP
2#

OrderBy = "isHot desc"
这样就可以按hot级别倒序
TOP
发新话题 回复该主题