[Typo3] HMENU with static images

JoH info at cybercraft.de
Sun Oct 9 23:30:01 CEST 2005


>> temp.MAIN_MENU = HMENU
>> temp.MAIN_MENU.1 = TMENU
>> temp.MAIN_MENU.1 {
>>   noBlur = 1
>>   NO.allWrap = <div class="menuItem">|</div>
>> }
>>
>> I want e.g:
>>
>> <a href="index.php?id=55"><img src="55.png" alt="" /></a>
>>
>> or maybe
>>
>> <a href="index.php?id=55"><img src="Name_of_page.png" alt="" /></a>
>
> hi
>
> i am not sure if it is optimal solution but it works
>
> maybe some well known TS guru can do it with one line less ;)
>
> temp.MAIN_MENU = HMENU
> temp.MAIN_MENU.1 = TMENU
> temp.MAIN_MENU.1 {
> noBlur = 1
> NO.subst_elementUid = 1
> NO.stdWrap.wrap = <img src="{elementUid}.png" alt="" />|
> NO.allWrap = <div class="menuItem">|</div>
> }

But this should give you something like

<div><img src="uid.png" /><a>Title</a></div>

As far as I understood it should have been

<div><a><img src="title.png" /></a></div>

Maybe this one could do the job (not tested):

temp.MAIN_MENU = HMENU
temp.MAIN_MENU {
    1 = TMENU
    1 {
        NO {
            linkWrap = <img src="fileadmin/images/|.png" />
            ATagBeforeWrap = 1
            allWrap = <div class="menuItem">|</div>
        }
    }
}

Even though I don't think it's a good idea to have the editors upload images
with the same name as the page each time they created a new one.

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.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-english mailing list