1
I am trying to implement the nav-bar so that it knows what module is on and highlight it. I figured out that the best place to start was in
system_block_mainmenu.html since it seem to do it well for the “Main Menu” block.
I have notice that
le="color: #000000"><?php <li class="<{if !$block.nothome}>active<{/if}>">
is used for Home and
le="color: #000000"><?php <li class="<{if $module.highlight}>active<{/if}>">
is used for the other modules.
When I tried to appy this to the nav-bar (themes/xbootstrap/tpl/nav-menu.html) I didn’t quite get the results expected
le="color: #000000"><?php <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="<{if !$block.nothome}>active<{/if}>"> <a href="<{$xoops_url}>"> <span class="glyphicon glyphicon-home"></span> <{$smarty.const.THEME_HOME}> </a> </li> <li class="<{if $module.highlight}>active<{/if}>"> <a href="<{$xoops_url}>/modules/newbb"> <span class="glyphicon glyphicon-bullhorn"></span> <{$smarty.const.THEME_MODULE3}> </a> </li> <li class="<{if $module.highlight}>active<{/if}>"> <a href="<{$xoops_url}>/modules/contact"> <span class="glyphicon glyphicon-phone"></span> <{$smarty.const.THEME_MODULE4}> </a> </li> </ul> </div>
When I click on the forum (NewBB) all the button in the nav-bar get highlighted (including home). It is only when I clik on Home that only Home is highlighted. Any idea what is the issue?
Also I was trying to print out what value $block.nothome and $module.highlight had. nothome displays nothing while highlight displays nothing or the value 1.
The folks at
http://ocaholic.ch have managed to implement this, I wonder how.