I had a play

This is what I ended up doing.
First I created a parameter in the menu modules.
Open mod_mainmenu.xml and change this
Code:
<param name="expand_menu" type="radio" default="0" label="Expand Menu" description="Expand the menu and make its sub-menus items always visible">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
to this
Quote:
Next I had to modify the template to show my image code, but only for the menu where image_menu was selected.
So I opened up ./modules/tmpl/mod_mainmenu.html and changed
Code:
{ITEM_NAME}
to
Code:
<mos:tmpl type="simplecondition" requiredvars="IMAGES=1" varscope="item">
<img src="http://www.aainternational.co.uk/templates/temp/images/small-img{ITEM_ID}.jpg" class="smallimg-holder" alt="{ITEM_NAME}" width="29" height="25" /><h4>
</mos:tmpl>
{ITEM_NAME}
<mos:tmpl type="simplecondition" requiredvars="IMAGES=1" varscope="item">
</h4>
</mos:tmpl>
a Few things to note in here, firstly i had to hard code the images directory, because i dont know if its a 1.07 bug or a 508 bug or something else, but with SEO urls on it added the url to the end of whatever page it was on, which was a pain in the ar**. Secondly to get each image unique, it pulls the ITEM_ID. So i could then click on the link and see what the id was, and rename all the images to suit. Which is a lot easier than it sounds.
Lastly I had to make a change to the mod_mainmenu.class.php file. change this
Code:
$tmpl->addVar( 'mod_mainmenu', 'CLASS', $params->get( 'class', '' ) );
$tmpl->addVar( 'mod_mainmenu', 'MODULECLASS', $params->get( 'moduleclass', '' ) );
to this
Code:
$tmpl->addVar( 'mod_mainmenu', 'CLASS', $params->get( 'class', '' ) );
$tmpl->addVar( 'mod_mainmenu', 'MODULECLASS', $params->get( 'moduleclass', '' ) );
$tmpl->addVar( 'mod_mainmenu', 'IMAGES', $params->get( 'image_menu', '' ) );
You will notice that the normal 508 code produces a normal list item, by doing the above it puts the image within that list item, this is acceptable but a lot of people might not like it. It products list items like this (i abbreviated it slightly to make it easier on the eyes)
Code:
<li><a href="/content/blogcategory/2/33/" title="Rural Situation Assessing"><img src="/images/small-img33.jpg" class="smallimg-holder" alt="Rural Situation Assessing" width="29" height="25" /><h4>Rural Situation Assessing</h4></a><span class="unsichtbar">.</span></li>
You can see it in action at
http://www.aainternational.co.ukJust a few minor things that need clearing up, like the lists on category pages and the print/pdf icons.
Also i notice none of the mosimage tags are replaced with images. Its getting to be that this 508 hack is more hassle than its worth, especially if you dont know whats it changed. I mean why no images showing up?
thnx
Paul