[TYPO3] repeat first level title in second level

Bas van der Togt bas.vander.togt at efocus.nl
Tue Nov 13 17:48:45 CET 2007


Hello Joey (the menu expert :) )

I go for the most easiest way (LOAD_REGISTER)!
But performance is also very important actually. What do you suggest?
Can you please give me an example how to do this?

Here's my setup:

obj.tabmenu = HMENU
obj.tabmenu {
	#entryLevel = 0
   	special = list
   	special.value = 6,5,4,3,2,15,16
   	wrap = <ul id="nav">|</ul>
   	1 = TMENU
   	1 {
   		expAll = 1
     		noBlur = 1

   		NO {
     			stdWrap.htmlSpecialChars = 1
       			ATagTitle.field = subtitle // title
       			wrapItemAndSub = <li>|</li>
     		}

		ACT = 1
   		ACT {
     			stdWrap.htmlSpecialChars = 1
       			ATagTitle.field = subtitle // title
       			ATagParams < obj.tabmenu.1.NO.ATagParams
       			wrapItemAndSub = <li>|</li>
     		}
   	}

  	2 = TMENU
   	2 {
   		stdWrap.dataWrap = <li>{field:title}</li>  	
   		expAll = 1
     		wrap = <ul>|</ul>
     		noBlur = 1

     	NO {
     		stdWrap.htmlSpecialChars = 1
       		ATagTitle.field = subtitle // title
       		wrapItemAndSub = <li>|</li>
     	}

     	ACT = 1
     	ACT {
     		stdWrap.htmlSpecialChars = 1
       		ATagTitle.field = subtitle // title
       		wrapItemAndSub = <li class="act">|</li>
     	}

     	IFSUB = 1
     	IFSUB {
     		stdWrap.htmlSpecialChars = 1
       		ATagTitle.field = subtitle // title
       		wrapItemAndSub = <li class="ifsub">|</li>
     	}

     	ACTIFSUB = 1
     	ACTIFSUB {
     		stdWrap.htmlSpecialChars = 1
       		ATagTitle.field = subtitle // title
       		wrapItemAndSub = <li class="actifsub">|</li>
     	}
}

kind regards,
Bas

JoH wrote:
>>>> I'm trying to repeat the first level title in the second TMENU.
>>>> I got this:
>>>>
>>>> 2 = TMENU
>>>> 2 {       # repeat title from level1
>>>>     stdWrap.dataWrap = <li>{field:title}</li>
>>> did you try leveltitle  here?
>> Thank you for your answer Daniel!
>> Unfortunately that's not working.
>> Any other ideas?
> 
> Depends on how you setup the first level TMENU, the and how they are 
> connected.
> And it depends on the amount of performance you are willing to spend.
> 
> The "brute force" way would be to fire an additional MySQL SELECT for each 
> of the entries to get the parent title based on the pid value of the item.
> The more elegant way would be to use LOAD_REGISTER within the setup of the 
> parent item.
> 
> So what's it gonna be?
> Maybe you could post the complete setup of your HMENU?
> 
> Joey 
> 
> 


More information about the TYPO3-english mailing list