Difference between #3 and #6 of
Using the jqueryslidemenu plugin with CMenu


Title unchanged

Using the jqueryslidemenu plugin with CMenu

Category unchanged


Yii version unchanged

Tags unchanged

Interface, Menu, Widgets

Content changed

We are going to use it in our main.php layout file for the sake of the example -and because it is the place where we, most of us, will use it.

First we register the required css and js files for our menu.

Put this code inside < head > section < /head > of yii/your_app/protected/views/layout/main.php

// remember that you can actually point to the js files directly if
//Register jQuery, JS and CSS files
Yii::app()->clientScript->registerCssFile($jqueryslidemenupath.'/jqueryslidemenu.css'); oreScript('jquery');
<div id="myslidemenu" class="jqueryslidemenu">
<!-- <div id="mainmenu"> -->
<?php $this->widget('zii.widgets.CMenu',array(
)); ?>
<br style="clear: left" />

</div><!-- mainyslidemenu -->
Just make sure that you have the runtime and assets's folders permissions to be writable and correct the index.php file Yii path's to the correct one on your computer.

Also remember that if you use assets to publish your css and js, everytime you edit css or js you must delete subfolder in assets that contains published files, and refresh the page.
18 1
Viewed: 38 338 times
Version: 1.1
Category: How-tos
Written by: Antonio Ramirez
Last updated by: pc131
Created on: Oct 28, 2010
Last updated: 10 years ago
Update Article


View all history