[TYPO3-english] Add a link to the parent menu item in submenu

Daniel Rutzen ardan at gmx.net
Fri Sep 4 15:39:20 CEST 2009


Thank you Tyler!

I kinda thought of that as well, but what I don't get is:

How do I make Typo to list only the sub items in the nav.20, and only 
the single parent main (CARS) item in  nav.10 (and not all main items).

I'm a bit confused :D



At the moment, this is my Setup for the left second menu (for testing I 
hardcoded the 1st item)


subparts.leftnavi = HMENU
subparts.leftnavi {

	entryLevel = 1
	wrap= <li><a class="first" href="#">cars</a><ul> | 	
	</ul></li>
		
	1 = TMENU
	1.
	1.NO.wrapItemAndSub= <li> | </li>
	
	#CUR zustand
	1.CUR = 1
	1.CUR < .1.NO
		
	#ACT-Zustand
	1.ACT = 1
	1.ACT < .1.CUR
		
	
	}







Tyler Kraft schrieb:
> Opps - a small mistake (its probably not 100% as you need it but it 
> should give a basic idea for you. Check TSref for more info)
> 
> 
> temp.nav = HMENU
> temp.nav{
>     10=TMENU
>     10.wrap = <ul>|</ul>
>     10.NO.wrapItemAndSub = <li>|</li>
>     10.ATagParams = class="first"
> 
>     20 =TMENU
>     20.wrap = <ul>|</ul>
>     20.NO.allWrap = <li>|</li>
> }
> 
> 
> 
> Daniel Rutzen wrote:
>> Hello,
>>
>> I have a horizontal main menu and a vertical submenu. In the submenu, 
>> there are ony the sub-items listed from the parent main menu item.
>>
>> Let's say I have a main menu item 'cars' and sub pages for colors.
>> I've got it working that the second menu now shows the coresponding 
>> sub items, each in a <li></li> Tag:
>>
>> <li>blue cars</li>
>> <li>red cars</li>
>> <li>green cars</li>
>>
>>
>> What I would like to have is, that the first <li>-Element has a link to
>> the parent main menu item, and the sub items are in another <ul> 
>> within the parent <li>
>>
>> <ul>
>> <li>CARS
>>  <ul>
>>   <li>blue cars</li>
>>   <li>red cars</li>
>>   <li>green cars</li>
>>  </ul>
>> </li>
>> </ul>
>>
>>
>> This is a snippet from my HTML test template, how it should like in 
>> the end....
>>
>>
>> <ul id="secondmenu">
>> <!-- ###leftnavi### start -->
>>
>> <li><a href="#" class="first">CARS</a>
>>  <ul>
>>  <li><a href="#">blue cars</a></li>
>>  <li><a href="#">red cars</a></li>
>>  <li><a href="#">green cars</a></li>
>>  </ul>
>> </li>
>>
>> <!-- ###leftnavi### end -->
>> </ul><!-- secondmenu end -->
>>
>>
>>
>>
>> I hope I was able to explain what I am trying to do here :-)



More information about the TYPO3-english mailing list