1
You want to highlight the currently viewed module in your mainmenu? Here is how to do this ...
1.) Edit the following file:
/modules/system/blocks/system_blocks.php
Search for this function (about line 106) in this file:
function b_system_main_show()
insert this 2 lines before the foreach
le="color: #000000"><?php $mod = $GLOBALS['xoopsModule']; $dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
and this line after if (in_array($i, $read_allowed)) {
le="color: #000000"><?php $block['modules'][$i]['current'] = $dirname;
2.) Define a new style for an active Mainmenu link in your
themes styles.css
le="color: #000000"><?php td#mainmenu a.menuMainActive { /* your individual settings */ }
3.) Edit the Template for the Mainmenu Block
le="color: #000000"><?php <table cellspacing="0"> <tr> <td id="mainmenu"> <a class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a> <!-- start module menu loop --> <{foreach item=module from=$block.modules}> <{if $module.current == $module.directory}> <a class="menuMainActive" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a> <{else}> <a class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a> <{/if}> <{foreach item=sublink from=$module.sublinks}> <a class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a> <{/foreach}> <{/foreach}> <!-- end module menu loop --> </td> </tr> </table>
Now the currently viewed module should be displayed with your custom css style in your main menu.