[TYPO3] TypoScript menu config

Lamb, Brian blamb at jcvi.org
Mon Nov 5 21:03:07 CET 2007


Hello all, 

 

I currently have the following TypoScript to generate a menu on my site:

 

# Top menu

top.menu_1 = HMENU

top.menu_1.special = list

top.menu_1.special.value = 4, 5, 6, 123, 7, 8, 9, 10

 

# First level menu-object, textual

top.menu_1.1 = TMENU

top.menu_1.1 {

  # Normal state properties

  NO.allWrap = <li> | </li>

  NO.stdWrap.htmlSpecialChars = 1

 

  # Enable active state and set properties:

  ACT = 1

  ACT.stdWrap.htmlSpecialChars = 1

  ACT.allWrap = <li class="active"> | </li>

}

 

# Side menu

side.menu_1 = HMENU

side.menu_1.entryLevel = 1

 

# First level menu-object, textual

side.menu_1.1 = TMENU

side.menu_1.1 {

  tt_content.stdWrap.dataWrap >

  

  # Normal state properties

  NO.subst_elementUid = 1

  NO.allWrap = <li> | </li>

  NO.ATagTitle = 

  

  # Enable active state and set properties:

  ACT = 1

  ACT.stdWrap.htmlSpecialChars = 1

  ACT.allWrap = <li class="side_active"> | </li>

}

 

# Second level menu-object, textual

side.menu_1.2 = TMENU

side.menu_1.2 {

  tt_content.stdWrap.dataWrap >

  

  # Normal state properties

  NO.subst_elementUid = 1

  NO.allWrap = <li class="subA">|</li>

  NO.ATagTitle = 

  

  # Enable active state and set properties:

  ACT = 1

  ACT.stdWrap.htmlSpecialChars = 1

  ACT.allWrap = <li class="side_active subA"> | </li>

}

 

The problem is the active class I'm assigning colors the background of
the link. But when the menu item is on level 2, both the level 2 link
and its parent get colored. How can I set it so that only the active
class is applied to the current page and not its parents? 



More information about the TYPO3-english mailing list