WebSite-PHP Framework PHP
Mehrsprachig
Einfacher Ajax Modus
Kein HTML, kein JavaScript
URL Rewriting
Mails senden
Sitemap - RSS - Web service
Laden Sie WebSite-PHP FrameWork jetzt herunter
 


Loading
 


Tutorial : Menu with icons 
and link

Tutorials

>

Tutorial Menu

>

Tutorial : Menu with icons and link


Menu-02: Tutorial der Komponente Menu vom PHP FrameWork WebSite-PHP.

Tutorial : Menu with icons and link:











Zurück zum Tutorial der Komponente Menu



Quelltext

Quelltext


Datei: /pages/tutorials/menu/menu-02.php

<?php
class Menu02 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : Menu with icons 
                                and link"
;
        
        
// 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");
        
$menu_12 = new MenuItem("Menu 1.2",
                    
"http://www.website-php.com");
        
$menu_13 = new MenuItem("Menu 1.3",
                    
"http://www.oracleref.com");
        
$menu1->setMenuItems(
                        new 
MenuItems(
                            
$menu_11,
                            
$menu_12,
                            
$menu_13));
        
        
// 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');");
        
$menu_23 = new MenuItem("Menu 2.3",
                    
"javascript:alert('click Menu 2.3');");
        
$menu2->setMenuItems(
                        new 
MenuItems(
                            
$menu_21,
                            
$menu_22,
                            
$menu_23));
        
        
// Menu 3
        
$menu3 = new MenuItem("Menu 3");
        
$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));
        
        
$main_menu = new Menu();
        
$main_menu->setMenuItems(
                            new 
MenuItems(
                                    
$menu1,
                                    
$menu2,
                                    
$menu3));
                                    
        
$this->render = new WSPObject($main_menu,
                        
"<br/><br/><br/><br/>",
                        
"<br/><br/><br/><br/>");
    }
}
?>


Zurück zum Tutorial der Komponente Menu


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Start Dokumentation Herunterladen Schnellstart Tutorials Wiki Issue Tracker