Follow following steps: 1. Open root/protected/views/layout/main.php 2. write <?php Yii::app()->clientScript->registerCoreScript(‘jquery’); ?> in head section. 3.Test with <script type=”text/javascript”> $(function(){ alert(“Jquery testing”)}); </script>
In admin grid listing of any controller, we can add a custom action button along with viiew, update and delete.follow the steps: 1. open admin file where your cgridview code is written. 2. edit array( ‘class’=>’CButtonColumn’, ), to array ( ‘class’=>’CButtonColumn’, ‘template’=>'{view}{update}{delete}{setattributes}’, ‘buttons’=>array ( ‘setattributes’ => array ( ‘url’=>’Yii::app()->createUrl(“categories/setAttributes”, array(“id”=>$data->id))’, ), ), ), Params for […]
In WAMP: 1. Set your path of php in your local variables. 2. Open command prompt and type like ‘D:wampwwwyiiframeworkyiic webapp D:wampwwwyiinew app name’ a skelton of Yii app will be created