[Typo3] Creating an IMGMENU from a list?

Jason A. Lefkowitz jlefkowitz at oceana.org
Wed May 11 22:37:53 CEST 2005


Hey...

I've been banging my head into the wall trying to figure out one of the 
subtleties of Typo3's navigation-building structure.  Maybe someone here 
can put me on the right path.

I want to build a navigation bar that's a group of "button" images, each 
one linked to a page in the CMS.  These buttons all sit on top of a 
background image.

After much reading of documentation it looked like the IMGMENU 
functionality was what I wanted.  But I can't get it to behave the right 
way.  Here's what I've done.

I figured that if the IMGMENU was inside an HMENU that was set as the 
special "list" type, I would be able to assign a graphic button to each 
member of the list.  So I whipped this up:


temp.principal_menu = HMENU
temp.principal_menu.special = list
temp.principal_menu.special.value = <page IDs>

temp.principal_menu.1 = IMGMENU

temp.principal_menu.1 {

    main.XY = 555,37
    main.10 = IMAGE
    main.10.file = <path to background image>

    dWorkArea = 50,5

    NO {

       distrib = textX+100,0

       1 = IMAGE
       1.file = <path to first button image>

       2 = IMAGE
       2.file = <path to second button image>

    }

}

Now, the background image shows up fine.  BUT -- instead of one button 
being displayed for each page ID in the list -- all the buttons in the 
NO array get shown for EVERY page ID.  In other words, if I put in three 
page IDs and three buttons, I see all three buttons stacked on top of 
each other, then some space (the .distrib at work), then the three 
buttons all stacked together again, then the space, then the three 
buttons stacked together again.

What am I doing wrong?  What do I have to do to tell Typo to associate 
one button with each page ID in the HMENU list?

Thanks in advance!

-- Jason Lefkowitz




More information about the TYPO3-english mailing list