blog_info.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. Dever::setInput('ad_title', '文章详情页');
  3. Dever::setInput('ad_name', 'article_info');
  4. $view
  5. ->set('name', 'blog_info')
  6. ->set('title', 'content/lib/article.getInfo#name')
  7. ->import('inc/head')
  8. ->render('content/lib/article.getInfo', array
  9. (
  10. 'article h1' => '$v.name',
  11. '.wz_info span|0' => '作者:<{$v.author.name}>',
  12. '.wz_info span|1' => '时间:<{$v.cdate}>',
  13. '.wz_info span|2' => '阅读:<{$v.num_view}>',
  14. '.content' => '$v.content',
  15. '.diggit@style' => 'display:none',
  16. '.share@style' => 'display:none',
  17. 'article .tags' => '$v.tag_html',
  18. '.info-pre-next p@style|0' => '<{$v.prev ? "" : "display:none"}>',
  19. '.info-pre-next a|0' => '$v.prev.name',
  20. '.info-pre-next a@href|0' => '$v.prev.link',
  21. '.info-pre-next p@style|1' => '<{$v.next ? "" : "display:none"}>',
  22. '.info-pre-next a|1' => '$v.next.name',
  23. '.info-pre-next a@href|1' => '$v.next.link',
  24. '.designer img@src|0' => '$v.author.avatar',
  25. '.designer img@style|1' => 'display:none',
  26. '.designer h3' => '$v.author.name',
  27. '.designer p' => '$v.author.desc',
  28. ))
  29. ->loop
  30. (
  31. '.wz_love li',
  32. 'content/lib/article.getRelation',
  33. array
  34. (
  35. 'a' => array
  36. (
  37. 'href' => '$v.link',
  38. 'title' => '$v.name',
  39. 'target' => '',
  40. 'img' => array
  41. (
  42. 'src' => '$v.pic_cover',
  43. 'alt' => '$v.name',
  44. ),
  45. 'h2' => array
  46. (
  47. 'html' => '$v.name',
  48. ),
  49. 'span' => array
  50. (
  51. 'html' => '$v.cdate',
  52. )
  53. ),
  54. )
  55. )
  56. ->fetch(array('.wz_love@style', 0), 'content/lib/article.getRelation', 'none')
  57. ->loop
  58. (
  59. '.ad a',
  60. 'main/api.ad|key=ad_foot&name=底部广告',
  61. array
  62. (
  63. 'href' => '$v.link',
  64. 'title' => '$v.name',
  65. 'img' => array
  66. (
  67. 'src' => '$v.pic',
  68. 'alt' => '$v,name',
  69. )
  70. )
  71. )
  72. ->fetch(array('.ad@style', 0), 'main/api.ad?key=ad_foot&name=底部广告', 'none')
  73. ->import('inc/right')
  74. ->import('inc/foot')
  75. # display
  76. ->display();