PHP Classes

PHP Nested Menu Class: Generate nested menu of HTML links

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 40%Total: 571 This week: 1All time: 5,374 This week: 560Up
Version License PHP version Categories
nested-menu 1.0Freely Distributable5HTML, PHP 5
Description 

Author

This class can generate nested menu of HTML links.

It can compose the definition of a HTML menu that can have sub-menus and images associated to each menu entry.

The class can generate HTML with CSS and JavaScript to render the menu structure in such way that menu entries expand when clicked to show sub-menus.

Picture of António Lourenço
  Performance   Level  
Name: António Lourenço <contact>
Classes: 4 packages by
Country: Portugal Portugal
Age: 62
All time rank: 215429 in Portugal Portugal
Week rank: 416 Up4 in Portugal Portugal Up

Example

<?php
/*
 * Lou_Menu.class
 * *Lou_index file
 * @author António Lourenço
 * version 1.0
 * 9/10/2014
 */

   
require_once("Lou_menu.class.php");
   
$menu = new MENU();
   
//$menu->openHtmlTest(); // this exists just for test the class.
    

   
$menu->addMenuName(HOME);
   
$menu->addMenuImg("Lou_imagem.php?category=HOME");
     
$menu->addSubMenu(Home,"index.php?","_top");
$menu->buildMenu();
   
$menu->addMenuName(Noticias);
   
$menu->addMenuImg("Lou_imagem.php?category=NOTICIAS");
     
$menu->addSubMenu(Hardware,"index.php?","_top");
   
$menu->addSubMenu(Software,"index.php?","_top");
   
$menu->addSubMenu(Mobile,"index.php?","_top");
   
$menu->addSubMenu(Internet,"index.php?","_top");
   
$menu->addSubMenu(App,"index.php?","_top");
   
$menu->addSubMenu(Tecnologia,"index.php?","_top");
   
$menu->addSubMenu(Jogos,"index.php?","_top");
$menu->buildMenu();


$menu->addMenuName(LOGIN);
   
$menu->addMenuImg("Lou_imagem.php?category=LOGIN");
   
$menu->addSubMenu(login,"index.php?","_top");
   
$menu->addSubMenu(Registo,"index.php?","_top");
   
$menu->addSubMenu(EsqueceuSenha,"index.php?","_top");
$menu->buildMenu();
   
$menu->addMenuName(Contactos);
     
$menu->addMenuImg("Lou_imagem.php?category=CONTACTOS");
     
$menu->addSubMenu(Contactos,"index.php?","_top");
$menu->buildMenu();
   
/* --------------------------- */
    // Show all builded menu.
   
@$menu->showMenu($_GET['selected_menu']); // this parameter maintain menu on the opened one!
    /* --------------------------- */
    //@$menu->closeHtmlTest($_GET["argument"]);
 
?>
</fieldset>



Screenshots  
  • print
  Files folder image Files  
File Role Description
Accessible without login Image file img.jpg Data Necessary image
Accessible without login Plain text file index.php Example Example
Accessible without login Plain text file Lou_imagem.php Aux. Auxiliary script
Plain text file Lou_menu.class.php Class class source

 Version Control Unique User Downloads Download Rankings  
 0%
Total:571
This week:1
All time:5,374
This week:560Up
User Ratings User Comments (2)
 All time
Utility:58%StarStarStar
Consistency:58%StarStarStar
Documentation:-
Examples:58%StarStarStar
Tests:-
Videos:-
Overall:40%StarStarStar
Rank:3709
 
This is a very good and useful class ;-)
9 years ago (José Filipe Lopes Santos)
70%StarStarStarStar
look dictionary for useless and then amateur
9 years ago (gambelunghe)
0%Star