DTCMS列表页自定义参数

时间:6年前   阅读:3990

1、频道管理中,URL配置,增加一个参数person_id

2、在photo_list.html模板页中,添加以下代码

<!--C#代码-->

    <%csharp%>

      string strwhere="status=0 ";

      if(DTRequest.GetQueryString("person_id")!=null)

      {

         string person_id=DTRequest.GetQueryString("person_id");

        if(person_id!="0"&&person_id!="")

        {

            strwhere="status=0 and person_id="+person_id;//person_id:在数据表dt_article新增字段 

        }

       

      }

     

    <%/csharp%>

3、更改分页列表条件strwhere部分为以下代码

<%set DataTable photoList=get_article_list(channel, category_id, pagesize, page, strwhere, out totalcount, out pagelist, "photo_list", category_id, "__id__")%><!--取得一个分页DataTable-->

本站声明:网站内容来源于网络,如有侵权,请联系我们https://www.qiquanji.com,我们将及时处理。

微信扫码关注

更新实时通知

上一篇:50ETF期权要怎么看盘?

下一篇:jquery全选 反选全不选效果

网友评论

请先 登录 再评论,若不是会员请先 注册