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
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
and this line after if (in_array($i, $read_allowed)) {
$block['modules'][$i]['current'] = $dirname;
2.) Define a new style for an active Mainmenu link in your
themes styles.css
td#mainmenu a.menuMainActive {
/* your individual settings */
}
3.) Edit the Template for the Mainmenu Block
<table cellspacing="0">
<tr>
<td id="mainmenu">
<a class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}>a>
<{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}>
td>
tr>
table>
Now the currently viewed module should be displayed with your custom css style in your main menu.