
Originally Posted by
speedyrider
In the tpl_mega_menu file:
<li class="escuela-li"><a href="index.php?main_page=index&cPath=12" class="drop"><?php echo HEADER_TITLE_NEOPRENOS; ?></a>
<div class="dropdown_1column">
<div class="col_1 firstcolumn">
<div class="levels">
<?php
// load the UL-generator class and produce the menu list dynamically from there
require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
$zen_CategoriesUL = new zen_categories_ul_generator;
$menulist = $zen_CategoriesUL->buildTree(true,12);
$menulist = str_replace('"level4"','"level5"',$menulist);
$menulist = str_replace('"level3"','"level4"',$menulist);
$menulist = str_replace('"level2"','"level3"',$menulist);
$menulist = str_replace('"level1"','"level2"',$menulist);
$menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
$menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
echo $menulist;
?>
</div>
</div>
</div>
</li>
then in includes / classes / categories_ul_generator.php
function buildTree($submenu=false, $variable)
{
$this->root_category_id = $variable;
return $this->buildBranch($this->root_category_id, '', $submenu);
}
}
So what i do is in the mega menu to call this buildtree function passing a variable that tells the categories generator where to start, the variable has to be your category number...works like a charm
Bookmarks