[TYPO3] separate image for each menu item

Xavier Perseguers typo3 at perseguers.ch
Tue Apr 15 07:47:46 CEST 2008


Hi David,

> I would like to place a different image with each menu item.
> Wondering if anyone has a simple way to do this. 

About a year ago I did this for a menu where I wanted to show a small 
picture related to the destination page. I did this:

     subparts.SUBMENU = HMENU
     subparts.SUBMENU.entryLevel = 1
     subparts.SUBMENU.1 = TMENU
     subparts.SUBMENU.1 {
         noBlur = 1
         NO {
             stdWrap.dataWrap (
               <img src="/fileadmin/images/submenu/{field:uid}.gif" 
alt="" width="62" height="40" />
               <span class="title">|</span><br />
               <span class="description">{field:subtitle}</span>
             )
             ATagParams = class="submenu"
         }
     }

Thus with this configuration the image has to be named according to the 
page id of the destination, that is fileadmin/images/submenu/12.gif for 
page id #12.

HTH

-- 
Xavier Perseguers


More information about the TYPO3-english mailing list