Fluid TYPO3 Bootstrap Menu

  1. {namespace v=FluidTYPO3\Vhs\ViewHelpers}
  2.  
  3. <div id="MainNav" class="navbar-wrapper">
  4. <nav class="navbar navbar-default navbar-static-top">
  5. <div class="container">
  6.  
  7. <div class="navbar-header">
  8. <a class="navbar-brand" href="/"><img src="/fileadmin/template/i/logo.jpg"></a>
  9. </div>
  10.  
  11. <v:page.menu pageUid="{v:variable.typoscript(path:'settings.site.rootPid')}" classHasSubpages="dropdown">
  12. <div id="navbar" class="navbar-collapse collapse">
  13.  
  14. <ul class="nav navbar-nav">
  15.  
  16. <f:for each="{menu}" as="menuPage" iteration="iteration">
  17. <li id="id{menuPage.uid}" class="{v:format.trim(content:'{menuPage.class}')}">
  18.  
  19. <a href="{menuPage.link}" data-toggle="{v:format.trim(content:'{menuPage.class}')}" class="{v:format.trim(content:'{menuPage.class}')}-toggle">{menuPage.title}</a>
  20.  
  21. <f:if condition="{menuPage.hasSubPages}">
  22. <ul class="dropdown-menu">
  23. <v:page.menu pageUid="{menuPage.uid}" as="submenu" classActive="active" classHasSubpages="">
  24. <f:for each="{submenu}" as="subMenuPage">
  25. <li class="{v:format.trim(content:'{subMenuPage.class}')}">
  26. <a href="{subMenuPage.link}">{subMenuPage.title}</span></a>
  27. </li>
  28. </f:for>
  29. </v:page.menu>
  30. </ul>
  31. </f:if>
  32.  
  33. </li>
  34. </f:for>
  35.  
  36. </ul>
  37.  
  38. </div>
  39. </v:page.menu>
  40. </div>
  41. </nav>
  42. </div>