view.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. $view
  3. ->fetch(array('link@href', 0), Dever::assets("global.css"))
  4. ->fetch(array('link@href', 1), Dever::assets('article.css', "css"))
  5. ->fetch(array('script@src', 4), Dever::assets('global.js'))
  6. ->fetch(array('script@src', 5), Dever::assets('article.js', 'js'))
  7. ->fetch(array('script', 2), 'main/content.view#share')
  8. ->set('title', 'main/content.view#name')
  9. ->import('inc/head')
  10. ->fetch(array('.breadcrumb .wrapper a@href', 0), 'Dever::url("home")')
  11. ->fetch(array('.breadcrumb .wrapper a', 1), 'main/content.view#cate_name')
  12. ->fetch(array('.breadcrumb .wrapper a@href', 1), 'main/content.view#cate_link')
  13. ->fetch(array('.breadcrumb .wrapper span', 0), 'main/content.view#name')
  14. ->fetch('h1', 'main/content.view#name')
  15. ->fetch(array('.article-info p', 0), 'main/content.view#author_name')
  16. ->fetch(array('.article-info p', 1), 'main/content.view#date')
  17. ->fetch('.article-summary', 'main/content.view#desc')
  18. ->fetch('.rich-wrapper', 'main/content.view#content')
  19. ->fetch(array('.ad', 0), '<{Dever::load("main/content.getAd", "图文底层页右侧广告位380X600")}>')
  20. # 精彩Top
  21. ->loop
  22. (
  23. '.top-module li',
  24. 'main/content.getPush|key=top&name=精彩TOP&num=7',
  25. array
  26. (
  27. 'em' => array
  28. (
  29. 'html' => '$k+1',
  30. ),
  31. 'a' => array
  32. (
  33. 'href' => '$v.link',
  34. 'title' => '$v.name',
  35. 'target' => '_blank',
  36. 'html' => '$v.name',
  37. ),
  38. )
  39. )
  40. # 相关推荐
  41. ->loop
  42. (
  43. '.star-module dl',
  44. 'main/content.getRelation',
  45. array
  46. (
  47. 'a|0' => array
  48. (
  49. 'href' => '$v.link',
  50. 'title' => '$v.name',
  51. ),
  52. 'a|1' => array
  53. (
  54. 'href' => '$v.link',
  55. 'title' => '$v.name',
  56. 'html' => '$v.name',
  57. ),
  58. 'img' => array
  59. (
  60. 'src' => '$v.pic',
  61. 'alt' => '$v.name',
  62. ),
  63. 'p' => array
  64. (
  65. 'html' => '$v.desc',
  66. ),
  67. )
  68. )
  69. ->import('inc/foot')
  70. ->display();