Skip to content

Instantly share code, notes, and snippets.

@PascaleBeier
Last active December 31, 2019 08:44
Show Gist options
  • Save PascaleBeier/e21b7bb46b1ecafd35be to your computer and use it in GitHub Desktop.
Save PascaleBeier/e21b7bb46b1ecafd35be to your computer and use it in GitHub Desktop.
TYPO3 - Bootstrap 4 navigation with dropdown
page.10.marks {
# MENU
rcnav = HMENU
rcnav.wrap (
<nav class="navbar rc-nav">
<button class="navbar-toggler hidden-md-up" data-target="#rc-nav" data-toggle="collapse" type="button">&#9776; Menü</button>
<div class="collapse navbar-toggleable-sm" id="rc-nav">
<ul class="nav navbar-nav container">|</ul>
</div>
</nav>
)
rcnav {
1 = TMENU
1 {
expAll = 1
NO.allWrap = <li class="nav-item">|</li>
NO.ATagTitle.field = abstract // description // title
ACT = 1
ACT.wrapItemAndSub = <li class="nav-item active">|</li>
ACT.ATagTitle.field = abstract // description // title
IFSUB = 1
IFSUB.wrapItemAndSub = <li class="nav-item dropdown">|</li>
IFSUB.ATagTitle.field = abstract // description // title
IFSUB.ATagParams = class="dropdown-toogle" data-toogle="dropdown"
ACTIFSUB = 1
ACTIFSUB.wrapItemAndSub = <li class="nav-item dropdown active">|</li>
ACTIFSUB.ATagTitle.field = abstract // description // title
ACTIFSUB.ATagParams = class="dropdown-toogle" data-toogle="dropdown"
wrap = <ul class="dropdown-menu">|</ul>
}
2 < .1
2 {
IFSUB = 1
IFSUB.wrapItemAndSub = <li class="dropdown-item">|</li>
IFSUB.ATagParams = class="dropdown-toogle" data-toogle="dropdown"
ACTIFSUB = 1
ACTIFSUB.wrapItemAndSub = <li class="dropdown-item active">|</li>
ACTIFSUB.ATagTitle.field = abstract // description // title
wrap = <ul class="dropdown-menu">|</ul>
}
3 < .2
3 {
ACT = 1
ACT.wrapItemAndSub = <li class="nav-item active">|</li>
ACT.ATagTitle.field = abstract // description // title
wrap = <ul class="dropdown-menu">|</ul>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment