[TYPO3-UG Dutch] listsubmenu waarvan de ul class veranderd kan worden
Daniel Doesburg
daniel at typo3-nl.eu
Sun Jan 9 13:35:49 CET 2011
Hoi Willem:
Ideetje. Niet getest.
lib.hoofdmenu = HMENU
lib.hoofdmenu {
1 = TMENU
1 {
#expAll = 1
noBlur = 1
wrap = <ul id="menunavigatie"> | </ul>
NO = 1
NO {
before.cObject=LOAD_REGISTER
before.cObject {
# Counter for the mainmenu points
mainMenuNumber.cObject=TEXT
mainMenuNumber.cObject {
value={register:mainMenuNumber}+1
insertData=1
}
mainMenuNumber.prioriCalc=intval
}
wrapItemAndSub.insertData = 1
wrapItemAndSub = <li id="menu{register:mainMenuNumber}">|</li>
stdWrap.htmlSpecialChars = 1
stdWrap.field = title
ATagTitle.field = nav_title
ATagParams = class="unselected"
ATagBeforeWrap = 1
linkWrap = <STRONG>|</STRONG>
}
ACT < .NO
ACT {
wrapItemAndSub.insertData = 1
wrapItemAndSub = <li
id="menu{register:leadingZero}{register:mainMenuNumber}">|</li>
ATagParams = class="selected"
}
IFSUB < .NO
IFSUB {
wrapItemAndSub = <li id="menu{register:mainMenuNumber}">|</li><ul
class="unselected">
}
ACTIFSUB < .ACT
ACTIFSUB {
wrapItemAndSub = <li
id="menu{register:leadingZero}{register:mainMenuNumber}">|</li><ul
class="selected">
}
}
2 < .1
2 {
wrap = | </ul>
NO {
before.cObject.mainMenuNumber.cObject.value={register:mainMenuNumber}
wrapItemAndSub = <li >|<span
class="bolletje">•</span></li>||*||*|<li >|<span
class="bolletje"> </span></li>
ATagParams =
}
ACT {
before.cObject.mainMenuNumber.cObject.value={register:mainMenuNumber}
wrapItemAndSub.insertData = 1
wrapItemAndSub = <li >|<span
class="bolletje">•</span></li>||*||*|<li >|<span
class="bolletje"> </span></li>
ATagParams =
}
}
}
Met vriendelijke groeten,
Daniel Doesburg
W.S.M. Perquin [YniVerse] schreef:
> Hallo lijst, Ik wil een lijst menu maken waarvan het submenu een<UL>
> class krijgt die anders is wanneer deze is geselecteerd: <ul
> id="menunavigatie"> <li id="menu1"><a class="unselected"
> href="#">Home</a> <ul class="unselected"> <li><a href="#">Sub Menu
> Item 1</a></li> <li><a href="#">Sub Menu Item 2</a></li> <li><a
> href="#">Sub Menu Item 3</a></li> <li><a href="#">Sub Menu Item
> 4</a></li> </ul> </li> <li id="menu2"><a class="unselected"
> href="#">About</a></li> <li id="menu3"><a class="unselected"
> href="#">Contact</a></li> <li id="menu4"><a class="selected"
> href="#">FAQ</a> <ul class="selected"> <li class="unselected"><a
> href="#">Sub Menu Item 5<span
> class="bolletje">•</span></a></li> <li class="selected"><a
> href="#">Sub Menu Item 6<span
> class="bolletje"> </span></a></li> </ul> </li> <li id="menu5"><a
> class="unselected" href="#">News</a> <ul class="unselected"> <li><a
> href="#">Sub Menu Item 7<span
> class="bolletje">•</span></a></li> <li><a href="#">Sub Menu Item
> 8<span class="bolletje">•</span></a></li> <li><a href="#">Sub
> Menu Item 9<span class="bolletje"> </span></a></li> </ul> </li>
> </ul>
>
> Dit heb ik reeds: temp_template.sitehoofdmenu = HMENU
> temp_template.sitehoofdmenu.entryLevel = 0
> #temp_template.sitehoofdmenu.excludeUidList = 48
> temp_template.sitehoofdmenu.1 = TMENU temp_template.sitehoofdmenu.1
> { #expAll zorgt ervoor dat alle menu items worden verzameld. nodig
> bij een suckerfish menu #expAll = 1 noBlur = 1 wrap =<ul
> id="menunavigatie"> |</ul> NO { before.cObject=LOAD_REGISTER
> before.cObject { # Counter for the mainmenu points
> mainMenuNumber.cObject=TEXT mainMenuNumber.cObject {
> value={register:mainMenuNumber}+1 insertData=1 }
> mainMenuNumber.prioriCalc=intval } } NO.wrapItemAndSub.insertData =
> 1 NO.wrapItemAndSub =<li
> id="menu{register:mainMenuNumber}">|</li>||*||*|<li
> id="menu{register:mainMenuNumber}">|</li>|
> NO.stdWrap.htmlSpecialChars = 1 NO.stdWrap.field = title
> NO.ATagTitle.field = nav_title NO.ATagParams = class="unselected"
> NO.ATagBeforeWrap = 1 NO.linkWrap =<STRONG>|</STRONG> ACT< .NO ACT =
> 1 ACT.wrapItemAndSub.insertData = 1 ACT.wrapItemAndSub =<li
> id="menu{register:leadingZero}{register:mainMenuNumber}">|</li>||*||*|<li
>
>
id="menu{register:leadingZero}{register:mainMenuNumber}">|</li>|
> ACT.stdWrap.htmlSpecialChars = 1 ACT.stdWrap.field = title
> ACT.ATagTitle.field = nav_title ACT.ATagParams = class="selected"
> ACT.ATagBeforeWrap = 1 ACT.linkWrap =<STRONG>|</STRONG> }
> temp_template.sitehoofdmenu.2< temp_template.sitehoofdmenu.1
> temp_template.sitehoofdmenu.2 { wrap =<ul> |</ul>
> NO.before.cObject.mainMenuNumber.cObject.value={register:mainMenuNumber}
>
>
NO.wrapItemAndSub =<li>|<span
> class="bolletje">•</span></li>||*||*|<li>|<span
> class="bolletje"> </span></li>| NO.ATagParams =
> ACT.before.cObject.mainMenuNumber.cObject.value={register:mainMenuNumber}
>
>
ACT.wrapItemAndSub.insertData = 1
> ACT.wrapItemAndSub =<li>|<span
> class="bolletje">•</span></li>||*||*|<li>|<span
> class="bolletje"> </span></li>| ACT.stdWrap.htmlSpecialChars =
> 1 ACT.stdWrap.field = title ACT.ATagTitle.field = nav_title
> ACT.ATagParams = ACT.ATagBeforeWrap = 1 ACT.linkWrap
> =<STRONG>|</STRONG> } Nou weet ik dat die
> temp_template.sitehoofdmenu.2.wrap =<ul> |</ul> niet de juiste is.
> Er moet immers OF<ul class="unselected"> staan OF<ul
> class="selected"> wanneer de bovenliggende LI geselecteerd is. Maar
> hoe zorg ik ervoor dat er verschil is tussen die twee?
>
> W-P
>
>
More information about the TYPO3-UG-Dutch
mailing list