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

W.S.M. Perquin [YniVerse] perquin at yniverse.nl
Sun Jan 9 23:41:25 CET 2011


Gevonden!
IFSUB < .NO
   	IFSUB = 1
   	IFSUB.allWrap.insertData=1
    	IFSUB.allWrap= <li id="menu{register:mainMenuNumber}">|<ul
class="unselected">
    	IFSUB.wrapItemAndSub = |</ul></li>
Etc.etc.

-----Oorspronkelijk bericht-----
Van: typo3-ug-dutch-bounces at lists.typo3.org
[mailto:typo3-ug-dutch-bounces at lists.typo3.org] Namens W.S.M. Perquin
[YniVerse]
Verzonden: zondag 9 januari 2011 20:55
Aan: 'TYPO3 Usergroup Dutch'
Onderwerp: Re: [TYPO3-UG Dutch] listsubmenu waarvan de ul class veranderd
kan worden

Met de volgende typoscript ben ik er bijna. De markup gaat nog verkeerd:
Onderstaand typoscript doet het wel, maar de volgorde is een complete mess:
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.stdWrap.dataWrap = <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.stdWrap.dataWrap = <li
id="menu{register:mainMenuNumber}">|</li>||*||*|<li
id="menu{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>
	IFSUB < .NO
    IFSUB = 1
    IFSUB.stdWrap.dataWrap = <li id="menu{register:mainMenuNumber}">|<ul
class="XXXX">
    ACTIFSUB < .ACT
    ACTIFSUB = 1
    ACTIFSUB.stdWrap.dataWrap = <li id="menu{register:mainMenuNumber}">|<ul
class="AAAAAA">
} 
temp_template.sitehoofdmenu.2 < temp_template.sitehoofdmenu.1
temp_template.sitehoofdmenu.2 {
	wrap = | </ul></li>
	
NO.before.cObject.mainMenuNumber.cObject.value={register:mainMenuNumber}
	NO.stdWrap.dataWrap = <li >|<span
class="bolletje">&bull;</span></li>||*||*|<li >|<span
class="bolletje">&nbsp;</span></li>|
	NO.ATagParams = class="unselected"
	
ACT.before.cObject.mainMenuNumber.cObject.value={register:mainMenuNumber}
	ACT.stdWrap.dataWrap = <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 = class="unselected" 
	ACT.ATagBeforeWrap = 1
	ACT.linkWrap = <STRONG>|</STRONG>
}


Het resultaat ziet er kort zo uit:
<ul id="menunavigatie"><a href="index.php?id=3"
class="unselected"><STRONG><li id="menu">BESCHRIJVEN</li></STRONG></a>
In plaats van:
<ul id="menunavigatie"><li id="menu"><a href="index.php?id=3"
class="unselected"><STRONG>BESCHRIJVEN</STRONG></a></li>

Detail ik weet het, maar zou wel fijn zijn als het werkt....

W-P
-----Oorspronkelijk bericht-----
Van: typo3-ug-dutch-bounces at lists.typo3.org
[mailto:typo3-ug-dutch-bounces at lists.typo3.org] Namens W.S.M. Perquin
[YniVerse]
Verzonden: zondag 9 januari 2011 15:20
Aan: 'TYPO3 Usergroup Dutch'
Onderwerp: Re: [TYPO3-UG Dutch] listsubmenu waarvan de ul class veranderd
kan worden

http://wiki.typo3.org/CRG
ga ik als uitgangspunt gebruiken. Die werkt (alleen is de output niet wat ik
wil.

I'll be back!

W-P

-----Oorspronkelijk bericht-----
Van: typo3-ug-dutch-bounces at lists.typo3.org
[mailto:typo3-ug-dutch-bounces at lists.typo3.org] Namens W.S.M. Perquin
[YniVerse]
Verzonden: zondag 9 januari 2011 15:02
Aan: 'Daniel Doesburg'; 'TYPO3 Usergroup Dutch'
Onderwerp: Re: [TYPO3-UG Dutch] listsubmenu waarvan de ul class veranderd
kan worden

Idee is leuk, maar werkt niet. Thans het resultaat gaat verkeerd.

W-P

-----Oorspronkelijk bericht-----
Van: typo3-ug-dutch-bounces at lists.typo3.org
[mailto:typo3-ug-dutch-bounces at lists.typo3.org] Namens Daniel Doesburg
Verzonden: zondag 9 januari 2011 13:36
Aan: typo3-ug-dutch at lists.typo3.org
Onderwerp: Re: [TYPO3-UG Dutch] listsubmenu waarvan de ul class veranderd
kan worden

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">&bull;</span></li>||*||*|<li >|<span 
class="bolletje">&nbsp;</span></li>
			ATagParams =
		}

		ACT {
	
before.cObject.mainMenuNumber.cObject.value={register:mainMenuNumber}
			wrapItemAndSub.insertData = 1
			wrapItemAndSub = <li >|<span 
class="bolletje">&bull;</span></li>||*||*|<li >|<span 
class="bolletje">&nbsp;</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">&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
>
>
_______________________________________________
TYPO3-UG-Dutch mailing list
TYPO3-UG-Dutch at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-dutch


_______________________________________________
TYPO3-UG-Dutch mailing list
TYPO3-UG-Dutch at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-dutch


_______________________________________________
TYPO3-UG-Dutch mailing list
TYPO3-UG-Dutch at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-dutch


_______________________________________________
TYPO3-UG-Dutch mailing list
TYPO3-UG-Dutch at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-dutch




More information about the TYPO3-UG-Dutch mailing list