[TYPO3] Submenus detached from Mainmenu

David Smeringe david at smeringe.se
Wed May 16 14:41:25 CEST 2007


Patrick Schlaepfer skrev:
> Hi there
> Do have the following page-structure:
> 
> - Menuitem1
> +- Menuitem1.1
>    Menuitem1.2
>    Menuitem1.3
> - Menuitem2
> +- Menuitem2.1
>    Menuitem2.2
>    Menuitem2.3
> 
> What I want to do, if Menuitem1 is active
> 
> Menuitem1  ¦  Menuitem2
> ---------
> 
>                                         Menuitem1.1
>                                         Menuitem1.2
>                                         Menuitem1.3
> 
> And if Menuitem2 ist active:
> 
> 
> Menuitem1  ¦  Menuitem2
>               ---------
> 
>                                         Menuitem2.1
>                                         Menuitem2.2
>                                         Menuitem2.3
> 
> It's not the same as the MENU_LEFT approach, as the submenu
> should be NOT under Menuitem1.
> 

Hi Patrick,

Unless I missunderstand the question..
The easiest way would be to create two separate menu definitions in your TS.

Something like this:
## Menu [Begin]
lib.subMenu = HMENU
lib.subMenu.entryLevel = 1

lib.subMenu.1 = TMENU
lib.subMenu.1.NO {
   allWrap =
}
## Menu [End]


## Menu [Begin]
lib.mainMenu = HMENU
lib.mainMenu.entryLevel = 0

lib.mainMenu.1 = TMENU
lib.mainMenu.1.NO {
   allWrap =
}
## Menu [End]

The example comes from the autogenerated menu by the TemplaVoila wizard. 
The key to success here is the entryLevel = 1/0..

Good luck


More information about the TYPO3-english mailing list