EFgMenu

Yii wrapper for fgmenu.

Download, comment and rate it on the Yii EFgMenu page.

Demo

Simple local menu

Code:

<!-- required HTML markup -->
<button id="bSimple" class="ui-widget ui-state-default ui-corner-all ui-button ui-button-text-only" title="click me!">
    <span href="#" class="ui-button-text">Press me</span>
</button>
$items = array(
    array('label'=>'Home', 'url'=>array('/site/index')),
    array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
    array('label'=>'Contact', 'url'=>array('/site/contact')),
    array('label'=>'Products', 'url'=>'#', 'items'=>array(
        array('label'=>'Yii', 'url'=>'#', 'items'=>array(
            array('label'=>'NLSClientScript', 'url'=>array('/site/page', 'view'=>'nlsclientscript')),
            array('label'=>'ELangUrlManager', 'url'=>array('/site/page', 'view'=>'elangurlmanager')),
            array('label'=>'EFgMenu', 'url'=>array('/site/page', 'view'=>'efgmenu')),
            //array('label'=>'XCruder', 'url'=>'#')
        )),
        array('label'=>'Desktop', 'url'=>'#', 'items'=>array(
            array('label'=>'BatchReplacePro', 'url'=>'#'),
            array('label'=>'DeformerPro', 'url'=>'#'),
            array('label'=>'WhereIsTheMouse', 'url'=>'#')
        ))
    ))
);
 
$this->widget('common.widgets.efgmenu.EFgMenu',array(
    'bDev'=>true,
    'id'=>'simpleMenu',
    'trigger'=>'#bSimple',
    'items'=>$items,
    'menuOptions' => array(
        'flyOut'=>true
    )
));

Horizontal menubar from array

Code:

$items = array(
    array('label'=>'Home', 'url'=>array('/site/index')),
    array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
    array('label'=>'Contact', 'url'=>array('/site/contact')),
    array('label'=>'Products', 'url'=>'#', 'items'=>array(
        array('label'=>'Yii', 'url'=>'#', 'items'=>array(
            array('label'=>'NLSClientScript', 'url'=>array('/site/page', 'view'=>'nlsclientscript')),
            array('label'=>'ELangUrlManager', 'url'=>array('/site/page', 'view'=>'elangurlmanager')),
            array('label'=>'EFgMenu', 'url'=>array('/site/page', 'view'=>'efgmenu')),
            //array('label'=>'XCruder', 'url'=>'#')
        )),
        array('label'=>'Desktop', 'url'=>'#', 'items'=>array(
            array('label'=>'BatchReplacePro', 'url'=>'#'),
            array('label'=>'DeformerPro', 'url'=>'#'),
            array('label'=>'WhereIsTheMouse', 'url'=>'#')
        ))
    ))
);
 
$this->widget('common.widgets.efgmenu.EFgMenu',array(
    'bDev'=>true,
    'id'=>'horz1',
    'items'=>$items,
    'menubarOptions' => array(
        'direction'=>'horizontal'
    )
));

Vertical menubar from array

Code:

$items = array(
    array('label'=>'Home', 'url'=>array('/site/index')),
    array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
    array('label'=>'Contact', 'url'=>array('/site/contact')),
    array('label'=>'Products', 'url'=>'#', 'items'=>array(
        array('label'=>'Yii', 'url'=>'#', 'items'=>array(
            array('label'=>'NLSClientScript', 'url'=>array('/site/page', 'view'=>'nlsclientscript')),
            array('label'=>'ELangUrlManager', 'url'=>array('/site/page', 'view'=>'elangurlmanager')),
            array('label'=>'EFgMenu', 'url'=>array('/site/page', 'view'=>'efgmenu')),
            //array('label'=>'XCruder', 'url'=>'#')
        )),
        array('label'=>'Desktop', 'url'=>'#', 'items'=>array(
            array('label'=>'BatchReplacePro', 'url'=>'#'),
            array('label'=>'DeformerPro', 'url'=>'#'),
            array('label'=>'WhereIsTheMouse', 'url'=>'#')
        ))
    ))
);
 
$this->widget('common.widgets.efgmenu.EFgMenu',array(
    'bDev'=>true,
    'id'=>'vert1',
    'items'=>$items,
    'menubarOptions' => array(
        'direction'=>'vertical'
    )
));

IPod-style local menu with Back button

Code:

<!-- required HTML markup -->
<button id="bIpodBack" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" title="click me!">
    <span href="#" class="ui-button-text">Press me</span>
</button>
$items = array(
    array('label'=>'Home', 'url'=>array('/site/index')),
    array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
    array('label'=>'Contact', 'url'=>array('/site/contact')),
    array('label'=>'Products', 'url'=>'#', 'items'=>array(
        array('label'=>'Yii', 'url'=>'#', 'items'=>array(
            array('label'=>'NLSClientScript', 'url'=>array('/site/page', 'view'=>'nlsclientscript')),
            array('label'=>'ELangUrlManager', 'url'=>array('/site/page', 'view'=>'elangurlmanager')),
            array('label'=>'EFgMenu', 'url'=>array('/site/page', 'view'=>'efgmenu')),
            //array('label'=>'XCruder', 'url'=>'#')
        )),
        array('label'=>'Desktop', 'url'=>'#', 'items'=>array(
            array('label'=>'BatchReplacePro', 'url'=>'#'),
            array('label'=>'DeformerPro', 'url'=>'#'),
            array('label'=>'WhereIsTheMouse', 'url'=>'#')
        ))
    ))
);
 
$this->widget('common.widgets.efgmenu.EFgMenu',array(
    'bDev'=>true,
    'id'=>'ipodMenuBack',
    'trigger'=>'#bIpodBack',
    'items'=>$items,
    'menuOptions' => array(
        'backLink'=> true,
        'crumbDefaultText' => ' '
    )
));

IPod-style local menu with Breadcumbs

Code:

<!-- required HTML markup -->
<button id="bIpodBreadcumb" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" title="click me!">
    <span href="#" class="ui-button-text">Press me</span>
</button>
$items = array(
    array('label'=>'Home', 'url'=>array('/site/index')),
    array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
    array('label'=>'Contact', 'url'=>array('/site/contact')),
    array('label'=>'Products', 'url'=>'#', 'items'=>array(
        array('label'=>'Yii', 'url'=>'#', 'items'=>array(
            array('label'=>'NLSClientScript', 'url'=>array('/site/page', 'view'=>'nlsclientscript')),
            array('label'=>'ELangUrlManager', 'url'=>array('/site/page', 'view'=>'elangurlmanager')),
            array('label'=>'EFgMenu', 'url'=>array('/site/page', 'view'=>'efgmenu')),
            //array('label'=>'XCruder', 'url'=>'#')
        )),
        array('label'=>'Desktop', 'url'=>'#', 'items'=>array(
            array('label'=>'BatchReplacePro', 'url'=>'#'),
            array('label'=>'DeformerPro', 'url'=>'#'),
            array('label'=>'WhereIsTheMouse', 'url'=>'#')
        ))
    ))
);
 
$this->widget('common.widgets.efgmenu.EFgMenu',array(
    'bDev'=>true,
    'id'=>'ipodMenuBreadcumb',
    'trigger'=>'#bIpodBreadcumb',
    'items'=>$items,
    'menuOptions' => array(
        'backLink'=> false
    )
));