nav.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. $view
  3. ->loop
  4. (
  5. '#dever_navbar li',
  6. 'main/menu-all',
  7. array
  8. (
  9. 'self' => array
  10. (
  11. 'class' => '<{(isset($nav) && $nav == $i) ? "active" : ""}>',
  12. ),
  13. 'a|0' => array
  14. (
  15. 'href' => '<{$v.link}>',
  16. 'title' => '<{$v.name}>',
  17. 'html' => '<{$v.name}>',
  18. //'class' => '<{$v.class}>',
  19. ),
  20. )
  21. )
  22. //等有时间优化一下这里
  23. //->check('passport/user.init', array('#dever_login_info', '#dever_login'))
  24. ->fetch('#dever-logo@href', '<{Dever::url("", "main")}>')
  25. ->fetch('#dever-logo', '<{Dever::load("main/config-one#name", 1)}>')
  26. ->fetch('#dever_login_info@style', '<{Dever::load("passport/user.data") ? "" : "display:none;"}>')
  27. ->fetch(array('#dever_login_info span', 0), '<{Dever::load("passport/user.data#msgnum")}>')
  28. ->fetch(array('#dever_login_info span', 1), '<{Dever::load("passport/user.data#username")}>')
  29. //->fetch(array('#dever_login_info a@href', 0), '<{Dever::url("user/msg")}>')
  30. ->fetch(array('#dever_login_info a@href', 1), '<{Dever::load("passport/user.data#link")}>')
  31. ->fetch(array('#dever_login_info a@href', 2), '<{Dever::url("login.quit", "passport")}>')
  32. ->fetch('#dever_login@style', '<{Dever::load("passport/user.data") ? "display:none;" : ""}>')
  33. ->fetch(array('#dever_login a@href', 0), '<{Dever::load("passport/login.url")}>')
  34. ->fetch(array('#dever_login a@href', 1), '<{Dever::load("passport/reg.url")}>')
  35. ->display();