[TYPO3-german] Horizontales Dropdown-Menü
Sebastian Schmal
sebastian.schmal at gmx.de
Thu Jun 26 17:24:57 CEST 2014
Hallo,
du musst auf jeden Fall mit IFSUB arbeiten! Und dann muss Dein ul li
anders verschachtelt werden!
kopiere dir das mal!
#*************************
# MainMenu
#*************************
lib.mainMenu = COA
lib.mainMenu {
15 = HMENU
15 {
entryLevel = 0
#excludeUidList =
wrap = <ul>|</ul>
#1 level top-menu
1 = TMENU
1 {
expAll = 1
# Normal state properties
NO = 1
NO.allWrap = <li class="first
item-{register:count_MENUOBJ}">|</li>|*|<li
class="item-{register:count_MENUOBJ}">|</li>|*|<li class="last
item-{register:count_MENUOBJ}">|</li>
NO.allWrap.insertData = 1
NO.ATagTitle.field = title // subtitle
NO {
# nicht linken, da typolinks verwendet werden
doNotLinkIt = 1
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
3 = TEXT
3 {
field = title
typolink.parameter.field = url
typolink.extTarget.field = target
typolink.title.stdWrap.data = field:title // subtitle
}
3.htmlSpecialChars = 1
default = TEXT
default {
field = title
typolink.parameter.field = uid
typolink.extTarget.field = target
typolink.title.stdWrap.data = field:title // subtitle
}
default.htmlSpecialChars = 1
}
}
#Wenn Submenu
IFSUB = 1
IFSUB.allWrap = <li class="first item-{register:count_MENUOBJ}
navi_dropdown">| |*|<li class="item-{register:count_MENUOBJ}
navi_dropdown">| |*|<li class="last item-{register:count_MENUOBJ}
navi_dropdown">|
IFSUB.allWrap.insertData = 1
IFSUB.ATagTitle.field = subtitle // title
IFSUB {
# nicht linken, da typolinks verwendet werden
doNotLinkIt = 1
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
3 = TEXT
3 {
field = title
typolink.parameter.field = url
typolink.extTarget.field = target
typolink.title.stdWrap.data = field:subtitle // title
}
default = TEXT
default {
field = title
typolink.parameter.field = uid
typolink.extTarget.field = target
typolink.title.stdWrap.data = field:subtitle // title
}
}
}
# Enable active state and set properties:
ACT = 1
ACT.allWrap = <li class="first first-act
item-{register:count_MENUOBJ}">|</li>|*|<li class="act
item-{register:count_MENUOBJ}">|</li>|*|<li class="last last-act
item-{register:count_MENUOBJ}">|</li>
ACT.allWrap.insertData = 1
ACT.ATagTitle.field = title // subtitle
ACT.stdWrap.htmlSpecialChars = 1
ACTIFSUB = 1
ACTIFSUB.allWrap = <li class="first first-act
item-{register:count_MENUOBJ} navi_dropdown">| |*|<li class="act
item-{register:count_MENUOBJ} navi_dropdown">| |*|<li class="last
last-act item-{register:count_MENUOBJ} navi_dropdown">|
ACTIFSUB.ATagTitle.field = subtitle // title
}
#End lvl1
#2 level
2 = TMENU
2 {
expAll = 1
wrap = <ul>|</ul></li>
# Normal state properties
NO = 1
NO.allWrap = <li class="first
item-{register:count_MENUOBJ}">|</li>|*|<li
class="item-{register:count_MENUOBJ}">|</li>|*|<li class="last
item-{register:count_MENUOBJ}">|</li>
NO.allWrap.insertData = 1
NO.ATagTitle.field = title // subtitle
NO {
# nicht linken, da typolinks verwendet werden
doNotLinkIt = 1
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
3 = TEXT
3 {
field = title
typolink.parameter.field = url
typolink.extTarget.field = target
typolink.title.stdWrap.data = field:title // subtitle
}
3.htmlSpecialChars = 1
default = TEXT
default {
field = title
typolink.parameter.field = uid
typolink.extTarget.field = target
typolink.title.stdWrap.data = field:title // subtitle
}
default.htmlSpecialChars = 1
}
}
# Enable active state and set properties:
ACT = 1
ACT.allWrap = <li class="first first-act
item-{register:count_MENUOBJ}">|</li>|*|<li class="act
item-{register:count_MENUOBJ}">|</li>|*|<li class="last last-act
item-{register:count_MENUOBJ}">|</li>
ACT.allWrap.insertData = 1
ACT.ATagTitle.field = title // subtitle
ACT.stdWrap.htmlSpecialChars = 1
}
}
}
------------------------------------------
TYPO3 - TIPPS - ANLEITUNGEN - NEWS
unter: http://blog.ingeniumdesign.de/
TYPO3 Webdesign Agentur Wiesbaden - Frankfurt
unter: http://www.ingeniumdesign.de/
Facebook Fan
http://www.facebook.com/ingeniumdesign/
------------------------------------------
Am 26.06.2014 14:35, schrieb Kristina Drömmer:
> Hallo!
>
> Ich versuche ein Dropdownmenü mit 2 Ebenen zu erstellen
>
> Hier mein Typoscript:
>
> page.10.marks.NAVI = HMENU
> page.10.marks.NAVI {
> 1 = TMENU
>
> 1 {
> wrap = <ul> | </ul>
> expAll = 1
> NO {
> linkWrap = <li> | </li>
> }
> CUR = 1
> CUR {
> doNotLinkIt = 1
> linkWrap = <li class="active"> | </li>
> }
> }
> 2 = TMENU
> 2 {
> wrap = <ul>|</ul>
> NO.allWrap = <li>|</li>
> }
> }
>
>
> Im Quellcode siehts dann so aus:
> <ul>
> <li> <a href="index.php?id=2" >Home</a> </li>
> <li class="active"> Agentur </li>
> <ul>
> <li><a href="index.php?id=4" >Wir</a></li>
> <li><a href="index.php?id=5" >Kontakt</a></li>
> </ul>
> </ul>
>
> Das schließende li (</li>) nach "Agentur" darf doch nicht da sein damit
> "Wir" und "Kontakt" die 2.Ebene darstellen kann oder?
> Mein CSS möchte nämlich so nicht funktionieren :( was muss ich ändern?
>
> Danke,
> Kristina
>
More information about the TYPO3-german
mailing list