zoukankan      html  css  js  c++  java
  • DTCMS列表页自定义参数。

    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-->

  • 相关阅读:
    窗口实训1
    课后练习----实现窗口的切换
    第五次实训作业继承
    课程总结
    999
    777777777777777777777
    7
    6
    5
    事件处理程序
  • 原文地址:https://www.cnblogs.com/qigege/p/5254511.html
Copyright © 2011-2022 走看看