Quote:
I do not need another menu, I need help with subject. |
Still reckon its smarter to use the module instead of harcoding into your template.
Means you can move it to different module positions, without having to change the template.
Also the menu used by the module, has a few features Arthurs module doesn't:
- The ability to highlight the active link
- Full control of look with CSS
- The ability to have display horizontally or vertically
- The ability to have it show a mymenu instead of the default setting of your Main Menu
I use it for my top horizontal menu on my own site:
www.stingrey.biz
But hey, just offering a suggestion.
anyway, here is the code you would need to hardcode it into your template:
# Vertical Menu V2.1 - by Arthur Konze - www.mamboportal.com
$database->setQuery("SELECT id, name, link FROM #__menu WHERE menutype='mainmenu' AND parent='0' AND access<='$gid' AND sublevel='0' AND published='1' AND type<>'separator' ORDER BY ordering");
$rows = $database->loadObjectList();
echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr>";
echo "<td width='2'><img src='$mosConfig_live_site/templates/akoblueportal/images/but_bar_divider.gif' /></td>";
$num_rows = count($rows);
$tab_width = floor(100 / $num_rows);
foreach($rows as $row) {
$mymenulink = $mymenu_row->link;
// $mymenu_row->name = strtoupper($mymenu_row->name);
if ($mymenu_row->type != "url") {
$mymenulink .= "&Itemid=$mymenu_row->id";
}
echo "<td width='$tab_width%' align='center'><a class='buttonbar' href='$mymenulink'>$row->name</a></td>";
echo "<td width='2'><img src='$mosConfig_live_site/templates/akoblueportal/images/but_bar_divider.gif' /></td>";
}
echo "</tr></table>";