[eluser]amipaxs[/eluser]
hi,
I'm using a horizontal menu in the header. i was requested to generate dynamic submenus only for one of the links, i created the corresponding forms on my cms and tables on the db.
code to display the dynamic submenu in the view:
Code:
[color=blue]
<li><a class="two" href="<?php echo base_url();?>portal/lineas_de_accion">Lines</a>
<ul>
<?php
foreach($submenu as $list){
echo "<li>".anchor("portal/submenus/".$list['id_lineas'], $list['nombre'])."</li>\n";
}
?>
</ul>
[/color]
to actually load the dynamic submenus, there're about 20 functions in the main controller where i'll have to add the following line of code in order to display dynamic submenus on each page, my question is, Am i using the right procedure??
Code:
$data['submenu'] = $this->MLines->getDynamicSubmenus(); //call model in order to load dynamic submenus
Any suggestions are welcome.