[TYPO3] GMENU how to get alias value and create image name from this value?

JoH asenau info at cybercraft.de
Mon Nov 12 03:03:47 CET 2007


> I have created a GMENU
>
> lib.GMenu = HMENU
> lib.GMenu.1 = GMENU
> lib.GMenu.1.NO {
>   XY = 200,200
>
>     10 = IMAGE
>     10.file = fileadmin/template/images/box/QUALITAET.gif
>     10.offset = 0,30
>
>     20 = IMAGE
>     20.file = fileadmin/template/images/box/box1.png
>     20.mask = fileadmin/template/images/box/box1_mask.png
>
>     30 = TEXT
>     30 {
>       text.field = title
>       fontFile = fileadmin/ttf/ARIALNBI.TTF
>       fontSize = 17
>       fontColor = #fefefe
>       niceText = 1
>       offset = 0,21
>       align = center
>     }
>
> }
>
> this generates boxes like this (on the right side):
> http://www.jedrzejak.pl/kopernik/gmenu.jpg
>
> I would like to use alias name (which is without Ä or other buggy
> letter as my 10.file name insted of one image (QUALITAET.gif) like
> right now. So I want to have as many images as my submenus in this
> boxes.

Use the import property of IMAGE.file.
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/5/2/

So

10 = IMAGE
10.file {
    import = fileadmin/template/images/box/
    import {
        field = alias
        case = upper
        wrap = |.gif
    }
}

should do the job.

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com
Jobs: http://www.professionals-only.com




More information about the TYPO3-english mailing list