[TYPO3] TS gurus wanted

JoH asenau info at cybercraft.de
Tue Nov 7 11:39:13 CET 2006


> if have a gmenu where i'd like to change to change some settings (XY,
> 4.file, and 10.offset) for just the submenus of page with id 6. i
> think it must work with register somehow, but thats not my world :(
>
> here ist my defintion for the submenu:
> ------------------------
> lib.menu.2 = GMENU
> lib.menu.2.wrap = |<br/>
> lib.menu.2.useLargestItemX = 1
> lib.menu.2 {
> NO {
> wrap = | <br/>
>    transparentBackground = 1
>    XY = [10.w]+50, [4.h]
>    4 = IMAGE
>    4.file = fileadmin/template/images/submenu_bg_off.gif
>
>    10 = TEXT
>    10 {
>    text.field = title
>    offset = 30,14
>    fontFile = fileadmin/template/fonts/arial.ttf
>    fontSize = 11
>    fontColor = #808080
>    }
>    }

Well - I guess the only thing you really need is a different file for the
IMAGE, since the rest (XY and 10.offset) can be calculated based on the
width of that image.

Since file is of the type "imgResource" you can use import.
import has got stdWrap properties, so you can use a cObject.

4.file {
    import = fileadmin/template/images/
    import.cObject = COA
    import.cObject {
        10 = TEXT
        10.value = submenu_bg_off.gif
        10.if {
            value = 6
            equals.field = pid
        }
        20 = TEXT
        20.value = submenu_another_bg_off.gif
        20.if {
            value = 6
            equals.field = pid
            negate = 1
        }
    }
}

Something like this should be working.

Joey

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





More information about the TYPO3-english mailing list