BetaRide
BetaRide

Reputation: 16834

typoscript two depending menus

I'd like to have a horizontal menu at the top of the website and a vertical menu with the menu levels 2 and 3 at the left side of the website.

Unfortunately my typoscript shows the same menu for both areas.

Any ideas what's wrong?

# Hauptmenu
lib.mainMenu = HMENU
lib.mainMenu.special = directory
lib.mainMenu.special.value = 1
lib.mainMenu.entryLevel = 0
lib.mainMenu.1 = TMENU
lib.mainMenu.1.NO {
  wrapItemAndSub = <div class="grid_1_menu"> | </div > |*| <div class="grid_1_menu"> | </div > |*| <div class="grid_1_menu grid_1_menu_end"> | </div >
}

# Seitennavigation
lib.subMenu= HMENU
lib.subMenu.special = directory
lib.subMenu.special.value = 1
lib.subMenu.entryLevel = 1
lib.subMenu.wrap = <ul class="sub-menu" id="menu-level-1">|</ul>
lib.subMenu.1 = TMENU
lib.subMenu.1.NO {
  wrapItemAndSub = <li class="first"> | </li> |*| <li class="middle"> | </li> |*| <li class="last""> | </li>
}

lib.subMenu.2 < lib.subMenu.1
lib.subMenu.2.wrap = <ul class="sub-menu" id="menu-level-2">|</ul>

Upvotes: 0

Views: 1489

Answers (2)

biesior
biesior

Reputation: 55798

That's easy:

special = directory
special.value = 123

creates a menu from ALL items inserted in page or sysfolder with uid = 123 , by writing the value (1 in your case) you instruct the TS to build menu from pages under (probably) main page.

As you can see in this sample, special directive takes precedens over the entryLevel.

Upvotes: 1

BetaRide
BetaRide

Reputation: 16834

Allthough I don't understand exactly why, I had to remove

lib.subMenu.special.value = 1

Upvotes: 0

Related Questions