[Typo3] It is possible to use designed buttons with GMENU?

Christoph Koehler christoph.koehler at gmail.com
Sat Aug 20 19:19:14 CEST 2005


Hey,

> I imagine a such menu, that is similar to GMENU. but he could use  
> different
> images for all buttons, and not just for one.

you can indeed use your own buttons, for example on www.oubsu.org, the  
main navigation.
Here is the TS for that menu:
-----------------------------------------
lib.mainMenu = HMENU
lib.mainMenu.entryLevel = 0

lib.mainMenu.1 = GMENU
lib.mainMenu.1.NO {
     XY = [5.w],75
     transparentColor = #FFFFFF
     5 = IMAGE
     5.file {
     import = uploads/media/
     import.field = media
     import.listNum = 0
     }

}

lib.mainMenu.1.RO < lib.mainMenu.1.NO
lib.mainMenu.1.RO = 1
lib.mainMenu.1.RO {
     5 = IMAGE
     5.file {
     import = uploads/media/
     import.field = media
     import.listNum = 1
     }
}

lib.mainMenu.1.CUR < lib.mainMenu.1.NO
lib.mainMenu.1.CUR = 1
lib.mainMenu.1.CUR {
     5 = IMAGE
     5.file {
     import = uploads/media/
     import.field = media
     import.listNum = 2
     }
}
---------------------------------------------
The important parts here are the import.* lines. You can assign media to  
all pages, so go to edit the page headers of your page, choose page type  
'advanced', and in the 4th box called 'Files', right above the TSConfig  
part, you can add files to that list.
import.listNum = 0 gets the first picture in that list, import.listNum = 1  
the second, etc. So in my example, I have the normal image in first  
position (import.listNum = 0), the rollover second, and the activated in  
third, and then just use those in the TS. Once you do that though, be  
reminded that it will make a copy of that image and save it in  
uploads/media, so if you plan on changing those, you have to delete if off  
the list in the page header, and add the updated one to see it.

Hope that helped!

Christoph



More information about the TYPO3-english mailing list