[TYPO3] Menu with images
Xatu Cans
xatucans at gmail.com
Wed Aug 27 17:07:15 CEST 2008
Fearless Goblin (Victor Livakovsky) escribió:
> Hello Xatu,
>
> Wednesday, August 27, 2008, 5:13:12 PM, you wrote:
>
>> Hi, I've created a menu with my own pics as menu items. I written this
>> TS code and it works fine:
>
>> # Main Horizontal dropdown menu
>> #
>> lib.mainmenu = HMENU
>> lib.mainmenu {
>> special = directory
>> special.value = 61
>> 1 = TMENU
>> 1 {
>> noBlur = 1
>> NO {
>> allWrap = |
>> stdWrap.cObject = COA
>> stdWrap.cObject {
>> 10 = TEXT
>> 10.wrap = <img src="fileadmin/tv-templates/menu/icon_|.gif"
>> border=0 alt="
>> 10.data = field:subtitle
>> 20 = TEXT
>> 20.wrap = |"
>> 20.data = field:subtitle
>> 30 = TEXT
>> 30.wrap = title="|" />
>> 30.data = field:subtitle
>> }
>> }
>> }
>> }
>
>> but now, I'd like to create an active menu state with new pics and I
>> don't know to do it. I've tried with this code, but i dosen't work:
>
>> # Main Horizontal dropdown menu
>> #
>> lib.mainmenu = HMENU
>> lib.mainmenu {
>> special = directory
>> special.value = 61
>> 1 = TMENU
>> 1 {
>> noBlur = 1
>> NO {
>> allWrap = |
>> stdWrap.cObject = COA
>> stdWrap.cObject {
>> 10 = TEXT
>> 10.wrap = <img src="fileadmin/tv-templates/menu/icon_|.gif"
>> border=0 alt="
>> 10.data = field:subtitle
>> 20 = TEXT
>> 20.wrap = |"
>> 20.data = field:subtitle
>> 30 = TEXT
>> 30.wrap = title="|" />
>> 30.data = field:subtitle
>> }
>> }
>> }
>
> Here you have 3 closing brackets. The first one is for
> stdWrap.cObject, second - for NO, third - for 1.
>
>> ACT = 1
>
>
> And here you're trying to set ACT for... lib.mainmenu
> But you should set it for lib.mainmenu.1
> So the problem is in one unnecessary closing bracket.
>
> It should be like this:
>> 30.wrap = title="|" />
>> 30.data = field:subtitle
>> }
>> }
>> ACT = 1
>
Thanks Victor, now it works fine
More information about the TYPO3-english
mailing list