[TYPO3-UG Dutch] listsubmenu waarvan de ul class veranderd kan worden

W.S.M. Perquin [YniVerse] perquin at yniverse.nl
Sun Jan 9 11:29:06 CET 2011


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">&bull;</span></a></li>
                            <li class="selected"><a href="#">Sub Menu Item
6<span class="bolletje">&nbsp;</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">&bull;</span></a></li>
                            <li><a href="#">Sub Menu Item 8<span
class="bolletje">&bull;</span></a></li>
                            <li><a href="#">Sub Menu Item 9<span
class="bolletje">&nbsp;</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">&bull;</span></li>||*||*|<li >|<span
class="bolletje">&nbsp;</span></li>|
	NO.ATagParams = 
	
ACT.before.cObject.mainMenuNumber.cObject.value={register:mainMenuNumber}
	ACT.wrapItemAndSub.insertData = 1
	ACT.wrapItemAndSub = <li >|<span
class="bolletje">&bull;</span></li>||*||*|<li >|<span
class="bolletje">&nbsp;</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