This extension consists of a multilevel vertical menu. The CSS code has been taken from this website: http://tympanus.net/codrops/2013/04/19/responsive-multi-level-menu
Demo ¶
Requirements ¶
Yii 1.1 or above
Usage ¶
1) You need to put the extension in the "extensions" folder.
2) You need to register the jQuery library.
3) You need to add this php code, which you need to modify according to your needs:
<?php
$this->widget('ext.multilevelverticalmenu.MultilevelVerticalMenu',
array(
"menu"=>array(
array("url"=>"",
"label"=>"Products",
array("url"=>array(
"route"=>"/product/create"),
"label"=>"Create product",),
array("url"=>array(
"route"=>"/product/list"),
"label"=>"Product List",),
array("url"=>"",
"label"=>"View Products",
array("url"=>array(
"route"=>"/product/show",
"params"=>array("id"=>3),
"htmlOptions"=>array("title"=>"title")),
"label"=>"Product 3"),
array("url"=>"",
"label"=>"Product 4",
array("url"=>array(
"route"=>"/product/show",
"params"=>array("id"=>5)),
"label"=>"Product 5")))),
array("url"=>array(
"route"=>"/event/create"),
"label"=>"Sales"),
array("url"=>array(
"route"=>"/event/create"),
"label"=>"Extensions",
"visible"=>false),
array("url"=>array(),
"label"=>"Documentation",
array("url"=>array(
"link"=>"http://www.yiiframework.com",
"htmlOptions"=>array("target"=>"_BLANK")),
"label"=>"Yii Framework"),
array("url"=>"",
"label"=>"Clothes",
array("url"=>array(
"route"=>"/product/men",
"params"=>array("id"=>3),
"htmlOptions"=>array("title"=>"title")),
"label"=>"Men"),
array("url"=>"",
"label"=>"Women",
array("url"=>array(
"route"=>"/product/scarves",
"params"=>array("id"=>5)),
"label"=>"Scarves"))),
array("url"=>array(
"route"=>"site/menuDoc"),
"label"=>"Disabled Link",
"disabled"=>true),
)
),
"transition" => 1 // To choose between 1,2,3,4 and 5.
)
);
?>
(The structure of this extension is based on the SMenu)
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.