I am porting an existing site to Joomla 1.5. The menus on the existing site use rollover images and inline Javascript. How can I make the menus look the same in Joomla and use the Joomla menus, without rewriting the menu code?
To show a menu item as an image, edit your menu item and select an image under the Parameters (System) heading (This list automatically populates with the images in the images/stories folder).
You will also need to set the module for the menu to display the images you set. Go to Extensions > Modules, then select the module for your menu (for instance, Main Menu). From there, select Other Parameters and then set Show Menu Images and Menu Image Link to Yes.
The rollovers will be a bit trickier. You won't be able to add inline JavaScript, but you might be able to use JavaScript to find your menu and assign rollovers to each item. Joomla ships with MooTools, or you can use jQuery if you're more comfortable wit hit. Use the Menu Tag ID field under Advanced Parameters to give your menu ul
element an HTML id.
It ended up being rather simple, actually. Joomla renders menus as <UL><LI><A>
tags. All I had to do was extract the background from one of the menu images (both in selected and unselected state), set a images as the background in each of the styles in the Joomla CSS, and voila, it almost looks exactly like the old site (minus a slightly different font, since the text is no longer part of the image).