31,040
edits
| Line 45: | Line 45: | ||
== To develop your own '''left menu''' == | == To develop your own '''left menu''' == | ||
Principle is same than for top menu. | Principle is same than for top menu. | ||
# You must edit function showmenu() of class MenuLeft to build your left menu. If you want to show standard menu with just minor changes without redoing everything, you have to loop on content of array $menu->liste | # You must edit function showmenu() of class MenuLeft to build your left menu. If you want to show standard menu with just minor changes without redoing everything, you have to loop on content of array $menu->liste. If you want to build a menu completely different and controled only by yourself, you must, into the method showmenu(), create an object $newmenu=new Menu() and use methods $newmenu->add and $newmenu->add_submenu to defined list of left menu entries to show. Once this is done, you show those entries using some "print" to show content of array $newmenu->liste (that we have just defined) instead of printing content of $menu->liste. | ||
Example of file htdocs/includes/menus/standard/mymenu.php | |||
<source lang="php"> | <source lang="php"> | ||
function showmenu() | function showmenu() | ||