[Typo3] gmenu_layer and tmenu menus

Jyot Boparai jboparai at elkera.com.au
Wed Mar 9 03:18:02 CET 2005

Hi list

I have the following situation:
MENU1         MENU2          MENU3         MENU4
MENU1.1      MENU2.1

When user hovers the mouse over MENU1, the submenu for MENU1 (MENU1.1 to MENU1.3) should be displayed and when user moves the mouse AWAY from MENU1 or the submenu of MENU1, the submenu should close.

I tried to achieve this using TMENUS for both first level menus and for submenus - it worked perfectly. 

I would like to insert custom images for the first level menus (MENU1 to MENU4). The submenus should still be TMENUs.

This is what I did:
I made the first level menus, MENU1 to MENU4 of type GMENU_LAYERS (three images for normal, rollover and pressed for each). I have these states working perfectly. And the submenus (MENU1.1 to MENU 1.3) etc are of type TMENU

When I move the mouse over a first level menu, say MENU1, the submenu appears (as required). However, when I move the mouse away from the sub-menu, it doesn't close. I have to click on the page body to hide the submenu.

Could someone please help me make sub-menus disappear when the mose is moved away.

Here is the script I have:

includeLibs.gmenu_layers = media/scripts/gmenu_layers.php

# The menu:
temp.Horizontal_Menu_MultiLevel = HMENU

temp.Horizontal_Menu_MultiLevel {
  useLargestItemX = 1
  excludeUidList = {$HorizontalMenuExcludeList}

temp.Horizontal_Menu_MultiLevel.1 = GMENU_LAYERS
temp.Horizontal_Menu_MultiLevel.1 {
  expAll = 1
  NO.ATagTitle.field = title
  wrap = <UL id=nav> | </UL>
  NO.wrapItemAndSub = <LI> | </LI>
  ACT = 1
  ACT.wrapItemAndSub = <LI id=sel> | </LI>
  ACT.ATagTitle.field = title

  lockPosition = x
  xPosOffset = -170
  topOffset = 60

temp.Horizontal_Menu_MultiLevel.1.NO {
  altImgResource.import = uploads/media/
  altImgResource.import.field = media
  altImgResource.import.listNum = 0

  # fall back GIFBUILDER item, if no result from altImgResource:
  imgParams = hspace="10"

temp.Horizontal_Menu_MultiLevel.1.RO < temp.Horizontal_Menu_MultiLevel.1.NO
temp.Horizontal_Menu_MultiLevel.1.RO = 1
temp.Horizontal_Menu_MultiLevel.1.RO.altImgResource.import.listNum = 1

temp.Horizontal_Menu_MultiLevel.1.ACT < temp.Horizontal_Menu_MultiLevel.1.NO
temp.Horizontal_Menu_MultiLevel.1.ACT = 2
temp.Horizontal_Menu_MultiLevel.1.ACT.altImgResource.import.listNum = 2

temp.Horizontal_Menu_MultiLevel.2 = TMENU
temp.Horizontal_Menu_MultiLevel.2 {
  expAll = 1

  NO.ATagTitle.field = title
  wrap = <UL id=level1> | </UL>

  NO.wrapItemAndSub = <LI> | </LI>
  ACT = 1
  ACT.wrapItemAndSub = <LI id=sel> | </LI>
  ACT.ATagTitle.field = title

Thanks in advance
- Jyot Boparai (jboparai)

The mailing list archive is found here:

More information about the TYPO3-english mailing list