Advertisement
BerndS59

mainMenu-Template

Nov 13th, 2020
694
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
  2. <f:spaceless>
  3.  
  4. <!-- SCB Partial/MainMenu -->
  5.  
  6. <!-- Hauptmenü -->
  7.  
  8. <!-- Navbar -->
  9. <nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark">
  10. <div class="container">
  11. <button class="navbar-toggler ml-auto"
  12. type="button"
  13. data-toggle="collapse"
  14. data-target="#navbarNavDropdown"
  15. aria-controls="navbarSupportedContent"
  16. aria-expanded="false"
  17. aria-label="Toggle navigation"
  18. >
  19. <span class="navbar-toggler-icon"></span>
  20. </button>
  21.  
  22. <div class="collapse navbar-collapse" id="navbarNavDropdown">
  23. <ul class="navbar-nav mr-auto">
  24. <f:for each="{mainMenu}" as="mainnavigationItem">
  25. <li class="nav-item
  26. {f:if(condition: mainnavigationItem.active, then: ' active')}
  27. {f:if(condition:'{mainnavigationItem.children}', then: ' dropdown')}"
  28. >
  29. <a class="nav-link
  30. {f:if(condition:'{mainnavigationItem.children}', then: ' dropdown-toggle')}
  31. {f:if(condition:'{mainnavigationItem.current}', then: ' current')}
  32. {f:if(condition:'{mainnavigationItem.active}', then: ' active')}"
  33.  
  34. href={mainnavigationItem.link}
  35. target="{mainnavigationItem.target}"
  36. title="{mainnavigationItem.title}"
  37. >
  38. {mainnavigationItem.title}
  39. </a>
  40. <f:if condition="{mainnavigationItem.children}">
  41. <f:render section="subMenu" arguments="{subMenu: mainnavigationItem.children}"/>
  42. </f:if>
  43. </li>
  44. </f:for>
  45. </ul>
  46. </div>
  47. </div>
  48. </nav>
  49. <!--</div>-->
  50.  
  51. <f:section name="subMenu">
  52. <ul class="dropdown-menu">
  53. <f:for each="{subMenu}" as="subItem">
  54. <li class="{f:if(condition: '{subItem.children}', then: ' dropdown')}"><a class="dropdown-item{f:if(condition:'{subItem.children}', then: ' has-submenu')}{f:if(condition:'{subItem.current}', then: ' current')}" href={subItem.link}>{subItem.title}</a>
  55. <f:if condition="{subItem.children}">
  56. <f:render section="subMenu" arguments="{subMenu: subItem.children}"/>
  57. </f:if>
  58. </li>
  59. </f:for>
  60. </ul>
  61. </f:section>
  62.  
  63.  
  64. </f:spaceless>
  65. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement