list.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. $view
  3. ->set('$title', 'Dever::input("cate") ? Dever::load("forum/cate.info#name") : "社区"')
  4. ->set('Dever::setInput("model_page", 2)')
  5. # 此处必须做下初始化,否则得不到下面的总数
  6. ->set('Dever::load("forum/posts.getList")')
  7. //->set('$forum', 'Dever::view("_model/3")')
  8. ->loop
  9. (
  10. '#dever_type li',
  11. 'forum/posts.config',
  12. array
  13. (
  14. 'a' => array
  15. (
  16. 'href' => '<{Dever::load("forum/posts.type#link", $v)}>',
  17. 'class' => '<{Dever::load("forum/posts.type#class", $v)}>',
  18. 'i' => array
  19. (
  20. 'class' => 'glyphicon glyphicon-<{$v.icon}>',
  21. ),
  22. 'span' => array
  23. (
  24. 'html' => '<{$v.name}>',
  25. )
  26. ),
  27. )
  28. )
  29. ->fetch('#dever_forum','<{Dever::load("forum/posts.getList")}>')
  30. ->fetch('#dever_page','<{Dever::page("current")}>')
  31. ->fetch('#dever_top@style', '<{Dever::load("forum/posts.top#display")}>')
  32. ->fetch('#dever_top_pic@style', '<{Dever::load("forum/posts.top#pic") ? "" : "display:none;"}>')
  33. ->fetch('#dever_top_pic img@src', '<{Dever::load("forum/posts.top#pic")}>')
  34. ->fetch('#dever_top_name', '<{Dever::load("forum/posts.top#name")}>')
  35. ->fetch('#dever_top_info', '<{Dever::load("forum/posts.top#info")}>')
  36. ->fetch('#dever_top_total', '<{Dever::load("forum/posts.top#total")}>')
  37. ->display();