[TYPO3] error on GMENU

Christopher Torgalson bedlamhotel at gmail.com
Tue Jan 15 13:10:38 CET 2008


Hi,

On Jan 15, 2008 12:46 PM, Kesit Barotoardi <barotoardi at yahoo.com.sg> wrote:
> sorry if my question is not clear enough.. :D
>
> If you look at the site http://www.open-php.com/index.php?id=68&L=2
> There're navigation: Aktuell - Vision - Projekte - etc
> The current size is fine (Aktuell is wider than the others).
>
> The problem is:
> I want Aktuell using butt_1.gif, Vision using butt_2.gif, Projekte using butt_3.gif and so on...
> butt_1.gif, butt_2.gif, etc. have different colours.
>
> The fact is: all navigations are using the last file image, which is butt_1.gif. (The last navigation is using butt_1.gif again)
>
> Please forgive for my language...but is it something wrong with my script?


Yes--see below.


> Thanks for the links, I will learn this again
>
>
> my setup template:
>
> lib.main_nav = HMENU
> lib.main_nav.entryLevel = 0
> lib.main_nav.1 = GMENU
> lib.main_nav.1{
>     wrap = <ul class="main">|</ul>
>         NO = 1
>         NO {
>           wrap = <li class="first"> | </li> |*| <li class="two"> |
>  </li>
>           XY = 125,72
>           5 = IMAGE
>           5 {
>           file = fileadmin/templates/images/butt_1.gif
>           }
>           10 = IMAGE
>           10 {
>           XY = 125,72
>           file = fileadmin/templates/images/butt_2.gif
>           }
>           15 = IMAGE
>           15 {
>           XY = 125,72
>           file = fileadmin/templates/images/butt_3.gif
>           }
>           20 = IMAGE
>           20 {
>           XY = 125,72
>           file = fileadmin/templates/images/butt_4.gif
>           }
>           25 = IMAGE
>           25 {
>           XY = 125,72
>           file = fileadmin/templates/images/butt_5.gif
>           }
>           30 = IMAGE
>           30 {
>           XY = 125,72
>           file = fileadmin/templates/images/butt_6.gif
>           }
>           35 = IMAGE
>           35 {
>           XY = 125,72
>           file = fileadmin/templates/images/butt_1.gif
>           }
>           40 = TEXT
>           40.text.field = title
>           40.fontFile = fileadmin/templates/font/GARA.TTF
>           40.fontSize = 16
>           # offset bestimmt die vertikale Ausrichtung der Schrift
>           40.offset = 15,25
>           40.fontColor = #FFFFFF
>           40.align = left
>           }
>
>         ACT = 1
>            ACT < .NO
>             ACT.ATagParams = class="main_current"
>
> }



Your TS is generating eight images for EVERY menu item. You just can't
see it because they're being generated one on top of the other--but
this is why each item seems to use "butt_1.gif" A basic GMENU--in fact
any of TYPO3's menu objects--basically provides a MODEL for rendering
each individual menu item. It is not necessary to specify the
rendering of each item individually because TYPO3 takes that model and
applies it to each page that happens to appear in the given menu.

Look at the examples in the TS By Example (linked elsewhere in this
thread); the examples Never have all of these multiple objects like
yours. Instead of trying to vary the buttons, you may find it easier
to simply put a background image 'behind' the buttons. This can be
done using CSS, or possible--depending on your specific needs--in the
GMENU itself.

-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list