blog.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. Dever::setInput('ad_title', '文章列表页');
  3. Dever::setInput('ad_name', 'article');
  4. $view
  5. ->set('name', 'blog')
  6. ->set('title', 'content/lib/cate.getInfo#name')
  7. ->import('inc/head')
  8. ->loop
  9. (
  10. '.blogs li',
  11. 'content/lib/article.getAll',
  12. array
  13. (
  14. 'a|0' => array
  15. (
  16. 'href' => '$v.link',
  17. 'title' => '$v.name',
  18. 'target' => '',
  19. 'img' => array
  20. (
  21. 'src' => '$v.pic_cover',
  22. 'alt' => '$v.name',
  23. ),
  24. 'h2' => array
  25. (
  26. 'html' => '$v.name',
  27. ),
  28. ),
  29. 'p' => array
  30. (
  31. 'html' => '$v.desc',
  32. ),
  33. '.blogs_time' => array
  34. (
  35. 'html' => '$v.cdate',
  36. ),
  37. '.blogs_onclick' => array
  38. (
  39. 'html' => '$v.num_view',
  40. ),
  41. 'a|1' => array
  42. (
  43. 'href' => '$v.link',
  44. 'title' => '$v.name',
  45. 'target' => '',
  46. ),
  47. )
  48. )
  49. ->fetch('.epages','<{Dever::page("current")}>')
  50. ->import('inc/right')
  51. ->import('inc/foot')
  52. # display
  53. ->display();