tags:

views:

345

answers:

1

hi to all , i have a problem with mod_main menu. i want to customize main menu on left side according to given html

  <li style=" background-color:#73B2DD;">Partnership and Grant Management</li>
  <li style=" background-color:#90C3E4;">Research, plicy and strategy analysis</li>
  <li style=" background-color:#73B2DD;">Program design, development and implementation</li>
  <li style=" background-color:#90C3E4;">Project Management - MIS design</li>
  <li style=" background-color:#73B2DD;">Governance and Institutional Development</li>
  <li style=" background-color:#90C3E4;">Training &amp; Capacity Building</li>
  <li style=" background-color:#73B2DD;">System Design, development and implementation</li>
  <li style=" background-color:#90C3E4;">Resource Mobilization</li>
  <li style=" background-color:#73B2DD;">Documentation</li>
  <li style=" background-color:#90C3E4;"></li>

so plz help me how to customize helper.php in mod_mainmenu?

i am using this condition

if($params->_registry['_default']['data']->menutype=='left-menu')
                    {

                    }

bt how to add <li></li> style according to html?

thanks in advance...

+1  A: 

You should first create a template override for the mainmenu module. that way you can edit the module output without hacking joomla. Then you can change the override (default.php) according to your needs.

Here a quick shot, but you'll get i guess:

$x = array['90C3E4','73B2DD'];
$node->addAttribute('style', 'background-color:<?php echo $x[++$i % 2]; ?>');
Mike