[TYPO3-english] generate li nested in li in menu

Thijs Hakkenberg thijs at hakkenberg.com
Wed Jul 7 15:38:53 CEST 2010


  Dear list,

I've got the follow setup for my menu:

# Menu 1 cObject
temp.menu_1 = HMENU
# First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1.wrap = <ul id="nav"> | </ul>
temp.menu_1.1 {
noBlur = 1
   expAll = 1
   # Normal state properties
   NO.allWrap = <li> | </li>
     # Enable active state and set properties:
   ACT = 1
   ACT.allWrap = <li class="current_page_item"> | </li>
}

# seccondlevel menu-object, textual
temp.menu_1.2 = TMENU
temp.menu_1.2.wrap = <ul> | </ul>
temp.menu_1.2 {
noBlur = 1
    #Normal state properties
   NO.allWrap = <li class="menu1-level2-no"> | </li>
    #Enable active state and set properties:
   ACT = 1
   ACT.allWrap = <li class="menu1-level2-act"> | </li>
}

which generates the following html:

<ul id="nav">
<li>item1</li>
<ul>
<li>sub 1</li>
<li>sub 2</li>
</ul>
<li>item 2</li>
<li>item 3</li>
<ul>
<li>sub 1</li>
<li>sub2 </li>
</ul>
</ul>

But, I would like this:

<ul id="nav">
<li>item1
<ul>
<li>sub 1</li>
<li>sub 2</li>
</ul>
</li>
<li>item 2</li>
<li>item 3
<ul>
<li>sub 1</li>
<li>sub2 </li>
</ul>
</li>
</ul>

I want to nest the sub menu into the first <li>'s  (I'm making a css 
based dropdown)
Can anyone tell me what the correct setup is?

Cheers,


More information about the TYPO3-english mailing list