search.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>搜索 {$theme_vars.varName1|default=''} </title>
  5. <meta name="keywords" content="" />
  6. <meta name="description" content="">
  7. <include file="public@head"/>
  8. <hook name="before_head_end"/>
  9. </head>
  10. <body class="">
  11. <include file="public@nav"/>
  12. <div class="container tc-main">
  13. <div class="row">
  14. <div class="col-md-9">
  15. <div class="main-title">
  16. <h3>'{$keyword}' 搜索结果 </h3>
  17. </div>
  18. <php>
  19. $where=function($query)use($keyword){
  20. $query->where('post.create_time','>=',0)->where('post.post_title','like',"%$keyword%");
  21. };
  22. </php>
  23. <portal:articles item="vo" where="$where" order="post.create_time DESC" page="10">
  24. <div class="list-boxes">
  25. <h2><a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id']))}">{$vo.post_title}</a>
  26. </h2>
  27. <p>{$vo.post_excerpt}</p>
  28. <div>
  29. <div class="pull-left">
  30. <div class="list-actions">
  31. <a href="javascript:;"><i class="fa fa-eye"></i><span>{$vo.post_hits}</span></a>
  32. <a href="{:cmf_url('portal/Article/doLike',array('id'=>$vo['id']))}"
  33. class="js-count-btn"><i class="fa fa-thumbs-up"></i><span class="count">{$vo.post_like}</span></a>
  34. <i class="fa fa-star-o"></i>
  35. </a>
  36. </div>
  37. </div>
  38. <a class="btn btn-warning btn-sm pull-right"
  39. href="{:cmf_url('portal/Article/index',array('id'=>$vo['id']))}">查看更多</a>
  40. </div>
  41. </div>
  42. </portal:articles>
  43. <div class="pagination">
  44. <page/>
  45. </div>
  46. </div>
  47. </div>
  48. <include file="public@footer"/>
  49. </div>
  50. <include file="public@scripts"/>
  51. <hook name="before_body_end"/>
  52. </body>
  53. </html>