1
ivan8r
Change color of menu item?
  • 2005/10/29 18:42

  • ivan8r

  • Just popping in

  • Posts: 57

  • Since: 2003/10/1


It is possible to change the color of just one menu item in the main menu so that it stands out??
Ivan Vasquez
http://www.akwebz.com

2
JMorris
Re: Change color of menu item?
  • 2005/10/29 19:32

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Yes, this is actually pretty easy to do provided you don't mind the link either being the first or last link in the menu. You can view the results of the following code at MyWebResource.

First, you'll need to clone your default template set, if you haven't done so already. Set your new template set as active and set "Update module template .html files from themes/your theme/templates directory?" to Yes.

Go into the Template Set Manager, go to System under your new template set and edit the system_block_mainmenu.html template.

Here's my code as an example:
<table cellspacing="0">
  <
tr>
    <
td id="mainmenu">
      <
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
      <!-- 
start module menu loop -->
      <{foreach 
item=module from=$block.modules}>
      <
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a>
        <{foreach 
item=sublink from=$module.sublinks}>
          <
class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a>
        <{/foreach}>
      <{/foreach}>
      <!-- 
end module menu loop -->
[
color=FF0000]<{if $xoops_isuser}>
    </
td>
<{else}>
      <
class="menuMain" href="http://mywebresource.com/user.php" style="color:#DD0000;font-weight:bold;">Member Login</a>
    </
td>
<{/if}>[/
color]
  </
tr>
</
table>


After you're done making your changes, set "Update module template .html files from themes/your theme/templates directory?" to No and enjoy.

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

Login

Who's Online

184 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 184


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits