In addition to the Yii database interface, this article introduces Zii components, including list view ListView and table view GridView. In addition, it includes some JQuery-based UI components, such as AutoComplete, DataPicker, Button, drag and Drop. This article introduces Menu usage. CMenu uses the Html list to display multi-level menus. Menu configuration is configured through its attribute item, each menu item includes three main attributes: visible, whether the current menu item is visible, and whether the current menu item is selected. The items sub-menu item. It also includes the following attributes: label: (optional) menu name. HTML tags are supported. url: Optional. Click the URL link template to go to this menu. Optional. Menu template: www.2cto. comlinkOptions: array. Optional. Additional HTML link attributes: itemOptions: array. Optional. Additional HTML attributes of menu items are displayed. SubmenuOptions: array (optional) HTML attribute of the sub-Menu. You can define the Menu in the Layout layout. For example, in this example, modify protected/views/Layout/main. php <? Php $ this-> widget ('zii. widgets. CMenu ', array ('items' => array ('label' => 'home', 'url' => array ('/site/Index ')), array ('label' => 'about', 'url' => array ('/site/page', 'view' => 'about ')), array ('label' => 'Contact ', 'url' => array ('/site/page', 'view' => 'Contact ')), array ('label' => 'login', 'url' => array ('/site/login '), 'visible '=> false),),);?> In this example, CViewAction is used to display several static pages. The default directory of the static page is the pages subdirectory under the View directory of the current Controller. In this example, two static pages are created under the pages directory, about. php, contact. to use CViewAction to display static pages, you need to modify the Controller's actions method: public function actions () {return array ('page' => array ('class' => 'cviewaction',);} if you want to display the menu level track (breadcrumbs ), the CBreadcrumbs component in Zii can be used. CBreadcrumbs is generally used with CMenu. <? Php if (isset ($ this-> breadcrumbs):?> <? Php $ this-> widget ('zii. widgets. CBreadcrumbs ', array ('link' => $ this-> breadcrumbs,);?> <! -- Breadcrumbs --> <? Php endif?> In this example, the default CSS of Yii is used. The result is as follows: if CSS is not used, the result is as follows: You need to use the CMenu component together with the appropriate CSS to display the beautiful menu.