开发者

Customization of joomla main menu

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 Buildin开发者_JAVA技巧g</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...


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]; ?>');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜