[TYPO3-german] Menu mit Submenu: uid vom Parent
Artur Grigoryan
ag at imagine-vs.de
Mon Nov 21 18:52:00 CET 2016
Hi,
ich habe folgenden Code fürs Menu:
lib.field_submenu = HMENU
lib.field_submenu {
1 = TMENU
1 {
expAll = 1
wrap = <ul class="nav navbar-nav" > | </ul>
NO = 1
NO {
wrapItemAndSub.insertData=1
wrapItemAndSub = <li class="uid{field:uid} lvl1 lvl1 first">|<div>test</div></li>|*|<li class="uid{field:uid} lvl1">|</li>|*|<li class="uid{field:uid} lvl1 last">|</li>
ATagTitle.field = title
ATagParams.dataWrap = class="uid{field:uid}"
}
IFSUB < .NO
IFSUB = 1
IFSUB.ATagParams = class="parent"
IFSUB {
# wrapItemAndSub.insertData=1
# wrapItemAndSub = <li class="uid{field:uid} lvl1 first parent">|</li>|*|<li class="uid{field:uid} lvl1 parent">|</li>|*|<li class="uid{field:uid} lvl1 last parent">|</li>
# ATagParams.dataWrap = class="uid{field:uid}"
}
ACT < .NO
ACT = 1
ACT {
# wrapItemAndSub.insertData=1
# wrapItemAndSub = li class="uid{field:uid} lvl1 first active current">|</li>|*|<li class="uid{field:uid} lvl1 active">|</li>|*|<li class="uid{field:uid} lvl1 last active ">|</li>
# ATagParams.dataWrap = class="uid{field:uid} active current"
}
ACTIFSUB < .NO
ACTIFSUB = 1
ACTIFSUB {
#wrapItemAndSub.insertData=1
#wrapItemAndSub = <li class="uid{field:uid} lvl1 first parent active current ">|</li>|*|<li class="uid{field:uid} lvl1 parent active current ">|</li>|*|<li class="uid{field:uid} lvl1 last parent active current">|</li>
#ATagParams.dataWrap = class="uid{field:uid} active current"
}
}
2 = TMENU
2 {
wrap = <ul class="navbar-slideout {field:uid}">|</ul>
#wrap = <div class="navbar-slideout"><div class="container"> <div class="navbar-slideout-wrap"> <div class="navbar-slideout-teaser"> <p class="navbar-slideout-teaser-headline"> </p> <p class="navbar-slideout-teaser-description"> </p> <a href="" class="btn btn-primary navbar-slideout-teaser-button">Mehr erfahren</a> </div> <a class="navbar-slideout-back" href="#back">〈 Zurück</a> <ul class="navbar-slideout-elements" > | </ul> <div class="navbar-slideout-media"> <a href=""> <img src="" alt=""> </a> </div> </div> </div></div>
NO = 1
NO {
wrapItemAndSub = <li class="first">|</li>|*|<li>|</li>|*|<li class="last">|</li>
stdWrap.htmlSpecialChars = 1
}
ACT = .NO
ACT {
wrapItemAndSub = <li class="first active current">|</li>|*|<li class="active">|</li>|*|<li class="last active">|</li>
ATagParams = class="active current"
}
}
}
jetzt möchte ich gerne in 2 die ui vom parent bekommen und diese als Klassennamen benutzen. Gibt's da ne möglichkeit?
wrap = <ul class="navbar-slideout {field:uid}">|</ul>
Alternativ kann man irgendwie bestimmen wo ich das Submenu reingereneder bekommen möchte?
z.B
- ul class"lvl1"
-li class"lvl1"
-a class"lvl1"
-div class"lvl2-conainer"
- <<< hier dann erst zweite Ebene.
Gruß,
Artur
More information about the TYPO3-german
mailing list