This extension consists of a 2-levels vertical menu. The css code has been taken from this website http://cssmenumaker.com/menu/elegant-accordion-menu. If you are interested in more than 2 levels, you should try this menu.
Try out a demo ¶
Requirements ¶
Yii 1.1 or above
Usage ¶
<?php
$this->widget('ext.verticalmenu2levels.VerticalMenu2Levels',
array(
"menu"=>array(
array("url"=>array("route"=>"site/index",
'params'=>array('lang'=>'en')),
"label"=>'Home'),
array("url"=>array(
"route"=>"/event/create"),
"label"=>"Create",
"visible"=>false),
array("url"=>array(),
"label"=>'Products',
array("url"=>array(
"link"=>"http://google.com",
'htmlOptions'=>array('target'=>'_BLANK')),
"label"=>"Google"),
array("url"=>array(
"route"=>"site/product2",
'params'=>array('lang'=>'en')),
"label"=>"Product 2"),
array("url"=>array(
"route"=>"site/product3",
'params'=>array('lang'=>'en')),
"label"=>"Product 3",
"disabled"=>true
),
),
array("url"=>array(),
"label"=>'About',
array("url"=>array(
"route"=>"site/company",),
"label"=>"Company"),
array("url"=>array(
"route"=>"site/contact",),
"label"=>"Contact"),
),
array("url"=>array("route"=>"site/contact",
'params'=>array('lang'=>'en')),
"label"=>'Contact'),
),
)
);
?>
(The structure of this extension is based on the SMenu)
It WORKS!
Thanks man!....
Simple and effective..
I just downloaded the extension and extract...
copy paste the sample code... it worked...
all I need to do is to tweak the code... !
awesom!
Awesom extension
Thanks to Moginn and the team for such an simple installation and excellent extension. Highly recommended....
option visible
Hi,
Greate job!
It's possible hidde item based in param like if($_SESSION['level'] == 1 array("url" => array(),........
?
thanks
Update: Thanks, works fine!
RE: option visible
yes, it is possible to hide an item!
Just use the 'visible' property like this:
array("url"=>array( "route"=>"/event/create"), "label"=>"Create", "visible"=>false),
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.