ClinkPager

I want to use ClinkPager in my website. I had to control some action when clink pager page is clicked

as we get page parameter in $_GET variable for the pages greater than one. I need to get the page when first page is clicked.

Please any got the solution help me out.

Thank you.

[color="#2E8B57"]/* Moved from "Yii 1.0.x Discussions" to "General Discussion for Yii 1.1.x" */[/color]

Exemple:(http://www.yiiframework.com/doc/api/1.1/CPagination/)

Controller action:




function actionIndex(){

    $criteria=new CDbCriteria();

    $count=Article::model()->count($criteria);

    $pages=new CPagination($count);


    // results per page

    $pages->pageSize=10;

    $pages->applyLimit($criteria);

    $models=Article::model()->findAll($criteria);


    $this->render('index', array(

    'models' => $models,

         'pages' => $pages

    ));

}




View:




<?php foreach($models as $model): ?>

    // display a model

<?php endforeach; ?>


// display pagination

<?php $this->widget('CLinkPager', array(

    'pages' => $pages,

)) ?>