[TYPO3-english] Having difficulty with a foldout menu

Bill Young billyoung at cox.net
Sun Mar 14 04:43:58 CET 2010


I am trying to setup a vertical menu that has some items that foldout. 
I have run into a couple of issues that I could use some insight on.

The first problem is that I have put a mark in my template called 
MAIN_MENU.  When I was using a simple GMENU, the HTML for my menu was 
inserted in the template at the mark as expected.  When I switch to a 
GMENU_FOLDOUT, the wrap I have surrounding the GMENU_FOLDOUT is inserted 
at the mark.  However, the GMENU_FOLDOUT itself is put right after the 
body tag.  Unfortunately, this causes the menu to show up in the upper 
left corner of the page instead of where I would like it in my layout.

The second problem is that each of the menu items is drawn at the exact 
same place on the page, one on top of another (i.e. only the last item 
shows).  Looking at the generated HTML, I do see all of the menu items 
listed.

My typoscript code is included below.  It's not quite finished yet as I 
am stuck on the above problems.  Any insights (or alternate ways to 
accomplish this) would be appreciated.

I have this code to put the menu at the desired mark:

   marks.MAIN_MENU < lib.ppcmenu

And this is the code for generating the menu:

includeLibs.gmenu_foldout = media/scripts/gmenu_foldout.php

# Build the menu.
lib.ppcmenu = COA
lib.ppcmenu {
   10 = HMENU
   10 {
     wrap = <div id="ppcmenu">|</div>
     entryLevel = 0
     1 = GMENU_FOLDOUT
     1 {
       expAll = 1
       NO {
         wrap = | <BR>

         XY = 159,23

         dontLinkIfSubmenu = 1
         stayFolded = 1
         foldSpeed = 6
         subMenuOffset = 10,18
         bottomHeight = 0

         arrowNO = media/bullets/arrow_no.gif
         arrowACT = media/bullets/arrow_act.gif
         arrowImgParams = hspace=4 align=top

         5 = IMAGE
         5.file = fileadmin/ppc/images/nav/button_normal.gif

         10 = TEXT
         10 {
             text.field = title
             niceText   = 1
             fontSize   = 12
             fontColor  = #000077
             fontFile   = fileadmin/fonts/Verdana.ttf
             offset     = 20,16
         }
       }

       RO < .NO
       RO = 1
       RO {
          5.file = fileadmin/ppc/images/nav/button_selected.gif
       }

     }

     2 = TMENU
     2 {
       NO {
         linkWrap = <nobr><font face=verdana size=1 
color=black><B>|</B></font></nobr><BR>
         stdWrap.case = upper
       }
     }
   }
}

Thanks,
Bill


More information about the TYPO3-english mailing list