ArtMenu class file.
- Author
- Byron Lee artme.nosp@m.nu@b.nosp@m.glee..nosp@m.myfa.nosp@m.stmai.nosp@m.l.co.nosp@m.m Copyright © 2011 http://www.yiiframework.com/license/ ArtMenu is a drop in replacement for CMenu with minor changes to support Artisteer 2.4.x based themes. The original version extended the CMenu class from 1.1.4, but was broken by later releases. ArtMenu (a minor modification of CMenu by Jonah Turnquist and Qiang Xue) displays a multi-level menu using nested HTML lists. The main property of ArtMenu is items}, which specifies the possible items in the menu. A menu item has three main properties: visible, active and items. The "visible" property specifies whether the menu item is currently visible. The "active" property specifies whether the menu item is currently selected. And the "items" property specifies the child menu items. The following example shows how to use ArtMenu: $this->widget('application.components.ArtMenu',array( 'cls'=>'art-menu', 'prelinklabel'=>'', 'postlinklabel'=>'', 'items'=>array( // Important: you need to specify url as 'controller/action', // not just as 'controller' even if default acion is used. array('label'=>'Home', 'url'=>array('site/index')), array('label'=>'Products', 'url'=>array('product/index'), 'items'=>array( array('label'=>'New Arrivals', 'url'=>array('product/new', 'tag'=>'new')), array('label'=>'Most Popular', 'url'=>array('product/index', 'tag'=>'popular')), )), array('label'=>'Login', 'url'=>array('site/login'), 'visible'=>Yii::app()->user->isGuest), ), ));
Definition at line 43 of file ArtMenu.php.