column 循环数据标签

属性列表

代码 名称 备注
name 缓存名称 zh.list.product
table 表格 product,picture,news,download,list 等
sort 排序 DESC/ASC
rows 数量 12
where sql语法

调用案例,支持翻页

  1. <div class="col-xs-12 col-sm-8 col-md-9" style="float:right">
  2. <div class="list_box">
  3. <h2 class="left_h">
  4. {$data.name}
  5. </h2>
  6. <div class="product_list product_list2">
  7. {php $s=0}
  8. {column=>("name"=>"zh.list.product","table"=>"product","sort"=>"DESC","rows"=>"{$config.web.list_product}","where"=>" pid=$data.id ")as $vo}
  9. {php $s++}
  10. <div class="col-sm-4 col-md-3 col-mm-6 product_img">
  11. <a href="{@jmp('zh',$vo['static_url'])}">
  12. <img src="{$config.setup.domain}{$vo.graph}" class="img-thumbnail" alt="{$vo.name}"
  13. />
  14. </a>
  15. <p class="product_title">
  16. <a href="{@jmp('zh',$vo['static_url'])}" title="{$vo.name}">
  17. {$vo.name}
  18. </a>
  19. </p>
  20. </div>
  21. {/column}
  22. {if $s==0}
  23. <div class="col-sm-4 col-md-3 col-mm-6 product_img">
  24. 没有找到栏目内容!
  25. </div>
  26. {/if}
  27. </div>
  28. {if $s>0}
  29. <div class="page">
  30. {include:zh.page}
  31. </div>
  32. {/if}
  33. </div>
  34. </div>

调用案例二,带搜索读GET参数

  1. <div class="col-xs-12 col-sm-8 col-md-9" style="float:right">
  2. <div class="list_box">
  3. <h2 class="left_h">
  4. 产品搜索
  5. </h2>
  6. <div class="product_list product_list2">
  7. {php $s=0} {column=>("name"=>"zh.product.soso","table"=>"product","sort"=>"DESC","rows"=>"12","where"=>"
  8. [ name LIKE '%$get.search%' or content LIKE '%$get.search%'] ") as $vo}
  9. {php $s++}
  10. <div class="col-sm-4 col-md-3 col-mm-6 product_img">
  11. <a href="{@jmp('zh',$vo['static_url'])}">
  12. <img src="{$config.setup.domain}{$vo.graph}" class="img-thumbnail" alt="{$vo.name}"
  13. />
  14. </a>
  15. <p class="product_title">
  16. <a href="{@jmp('zh',$vo['static_url'])}" title="{$vo.name}">
  17. {$vo.name}
  18. </a>
  19. </p>
  20. </div>
  21. {/column} {if $s==0}
  22. <div class="col-sm-4 col-md-3 col-mm-6 product_img">
  23. 抱歉没有搜索你要的内容!
  24. </div>
  25. {/if}
  26. </div>
  27. {if $s > 0}
  28. <div class="page">
  29. <span href="#">
  30. 共{$page.rows}条
  31. </span>
  32. <span href="#">
  33. 总{$page.pages}页
  34. </span>
  35. <span href="#">
  36. 第{$page.current}页
  37. </span>
  38. {if $page.current > 1}
  39. <a href="{@jmp('zh','search',$page.current-1)}">
  40. 上一页
  41. </a>
  42. {/if} {page page as $i} {if $page.current == $i['number']}
  43. <span class="current">
  44. {$i.number}
  45. </span>
  46. {else}
  47. <a href="{@jmp('zh','search',$i['number'])}">
  48. {$i.number}
  49. </a>
  50. {/if} {/page} {if $page.pages != $page.current and $page.pages > 0}
  51. <a href="{@jmp('zh','search',$page.current+1)}">
  52. 下一页
  53. </a>
  54. {/if}
  55. </div>
  56. {/if}
  57. </div>
  58. </div>
  59. <!-- left -->
  60. <div class="col-xs-12 col-sm-4 col-md-3">
  61. <!-- <div class="left_nav" id="categories">
  62. <h2 class="left_h">导航栏目</h2>
  63. </div> -->
  64. <div class="left_news">
  65. <h2 class="left_h">
  66. 新闻中心
  67. </h2>
  68. {include:zh.news}
  69. </div>
  70. {include:zh.contact}
  71. </div>
  72. </div>

友情连接: HDSysCms 火蝶建站 论文查重 SitemapXMlL生成 BSPHP验证系统
Copyright cms 2021 ·  HDSysCms免费企业建站系统 HdSysCms 网站地图 Tage标签