WebSite-PHP Framework PHP
Multi langues
Mode Ajax simple
Aucun HTML, aucun JavaScript
URL rewrinting
Envoi d'email
Sitemap - RSS - Web service
Télécharger le Framework WebSite-PHP maintenant
 


Loading
 


Tutorial : Menu vertical

Tutoriels

>

Tutoriel Menu

>

Tutorial : Menu vertical


Menu-03: Tutoriel du composants Menu du FrameWork PHP WebSite-PHP.

Tutorial : Menu vertical:















Retourner aux tutoriels du composants Menu



Code source

Code source


Fichier: /pages/tutorials/menu/menu-03.php

<?php
class Menu03 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Menu vertical";
        
        
// Menu 1
        
$menu1 = new MenuItem("Menu 1"""
                            
"img/wsp-admin/home_16.png");
        
$menu_11 = new MenuItem("Menu 1.1",
                    
"http://www.meteo-europ.com");
        
$menu1->setMenuItems(new MenuItems($menu_11));
        
        
// Menu 2
        
$menu2 = new MenuItem("Menu 2"""
                            
"img/wsp-admin/config_16.png");
        
$menu_21 = new MenuItem("Menu 2.1",
                    
"javascript:alert('click Menu 2.1');");
        
$menu_22 = new MenuItem("Menu 2.2",
                    
"javascript:alert('click Menu 2.2');");
        
$menu2->setMenuItems(new MenuItems($menu_21$menu_22));
        
        
// Menu 3
        
$menu3 = new MenuItem("Menu 3"""
                            
"img/wsp-admin/template_16.gif");
        
$menu_31 = new MenuItem("Menu 3.1");
        
$menu_32 = new MenuItem("Menu 3.2");
        
$menu_33 = new MenuItem("Menu 3.3");
        
$menu3->setMenuItems(
                        new 
MenuItems(
                            
$menu_31,
                            
$menu_32,
                            
$menu_33));
        
        
// Define vertical menu
        
$main_menu = new Menu(Menu::POSITION_VERTICAL);
        
$main_menu->setMenuItems(
                            new 
MenuItems(
                                    
$menu1,
                                    
$menu2,
                                    
$menu3));
                                    
        
$this->render = new WSPObject($main_menu,
                        
"<br/><br/><br/><br/>",
                        
"<br/><br/><br/><br/>",
                        
"<br/><br/><br/><br/>");
    }
}
?>


Retourner aux tutoriels du composants Menu


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Accueil Documentation Télécharger Quick start Tutoriels Wiki Issue Tracker