[Typo3] HMENU with static images

Rickard Andersson rickard.andersson+typo3 at gmail.com
Sun Oct 9 23:50:07 CEST 2005


JoH wrote:
> 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>
>         }
>     }
> }

Yes, I did have to modify it slightly. This is what I came up with (that 
works beautifully):

temp.MAIN_MENU = HMENU
temp.MAIN_MENU.1 = TMENU
temp.MAIN_MENU.1 {
   noBlur = 1

   NO.subst_elementUid = 1
   NO.stdWrap.wrap = <img src="img/{elementUid}.png" alt="|" />

   ACT = 1
   ACT.subst_elementUid = 1
   ACT.stdWrap.wrap = <img src="img/{elementUid}_act.png" alt="|" />
}

> 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.

This is not a problem since these are the five main sections of the 
website and the editors will hardly ever change them (most likely never).

Cheers,
Rickard Andersson



More information about the TYPO3-english mailing list