Install wordpress at your localhost

WordPress is a widely used CMS because of its simplicity and easy to use admin dashboard. Follow the basic steps to install it on your local machine: – I am considering your lamp/wamp/xampp is already installed and running in your machine. – Download latest version of your wordpress from http://wordpress.org/download/ and unzip it into wamp/www/wordpress folder, you […]

View Post

Yii CListView custom ajax search fileter

We can make a custom search on CListView listing page with pagination. Following steps, we are making search on left side filters but cList view results will filter on this ajax search : 1 search form   2. js script function with update Clistview grid widget 3. controller action as per values and render view. 1 […]

View Post

Yii orderable grid

Following Steps : Make sure your database table has a ‘sortOrder’ field. (Optional) Add the ‘sortOrder’ field to your Rules() function in your model Add the ‘actionSort()’ method to your controller to apply the sorting via ajax Add jQuery UI to your view that has the CGridView Setup the jQuery UI Code to work with […]

View Post

Include jquery in yii

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>

View Post

Yii add new action button to CGridView

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 […]

View Post

How to create Yii first app

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

View Post