mostly filebased Content Presentation System

navigation.htm 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <ul class="nav level{{ @level }}">
  2. <repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}">
  3. <li class="{{ @item.class }}"><a href="{{ @item.href }}">{{ @item.name }}</a>
  4. <check if="{{ is_array(@item.submenu) }}">
  5. <include href="navigation.htm" with="menu={{ @item.submenu }},level={{ @level + 1 }}" />
  6. </check>
  7. </li>
  8. </repeat>
  9. </ul>
  10. <check if="{{ false }}">
  11. <ul>
  12. <repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}">
  13. <check if="{{ is_array(@item) }}">
  14. <true>
  15. <li class="{{ in_array(@key,$url)?'active':'away' }}">
  16. <a href="{{ @SITE_URL }}/{{ @key }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item.index }}</a>
  17. <check if="{{ count(@item) > 1 }}">
  18. <ul>
  19. <repeat group="{{ @item }}" key="{{ @key2 }}" value="{{ @item2 }}">
  20. <check if="{{ @key2 != 'index'}}">
  21. <li class="{{ (in_array(@key2,$url) && in_array(@key,$url))?'active':'away' }}">
  22. <a href="{{ @SITE_URL }}/{{ @key }}/{{ @key2 }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item2 }}</a>
  23. </li>
  24. </check>
  25. </repeat>
  26. </ul>
  27. </check>
  28. </li>
  29. </true>
  30. <false>
  31. <li class="{{ in_array(@key,$url)?'active':'away' }}">
  32. <a href="{{ @SITE_URL }}/{{ @key }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item }}</a>
  33. </li>
  34. </false>
  35. </check>
  36. </repeat>
  37. </ul>
  38. </check>