[TYPO3] icon on a menuitem

PEF xx at xx.xx
Thu Jan 11 07:25:08 CET 2007


Thanks JoH - just what I needed.
Regards
Peter

JoH asenau wrote:
>> Need to add an icon to one particular menu-item in a GMENU.
>>
>> menuitem 1
>> menuitem 2 + icon
>> menuitem 3
>> ...
>> a.s.o
>>
>> I've tried to solve this by adding a section:
>> 30 = IMAGE
>> 30 {
>>     file = ...
>>     if {
>>       value = 83,99,121
>>       isInList.data = page:uid
>>     }
>> }
>>
>> But this doesn't seem to work. I got icons on every menuitem.
>>
>> Do I really have to make a "fakemenu " to solve this, or do I just
>> missed a simple point?
> 
> Why don't you use the "media" field of the specific page and upload the icon
> there.
> Then you create the image only if there is a file available.
> 
> 30 = IMAGE
> 30 {
>     file {
>         import = uploads/media/
>         import.field = media
>         import.listNum = 0
>     }
> }
> 
> No "if" necessary, since the IMAGE element will render only, if there really
> is an image in the media field.
> 
> This way you can easily add other icons to other pages without ever touching
> the TS code again.
> 
> Joey
> 


More information about the TYPO3-english mailing list