Yii分页不起作用

时间:2013-11-13 17:45:01

标签: php jquery yii

我正在使用CListWiev但是当我点击页面的特定链接时,它不会重新加载到页面。在我的浏览器中,我检查了一些响应是回到网站,但它没有做任何事情。一切都在localhost上运行良好,但是当我将我的项目放在服务器上时,它导致了这个失败。有人能帮助我吗?

控制器         

    class SiteController extends Controller {

        public function renderVideos($action, $order, $title, $isIndex) {
            $join = ' JOIN page_has_video on page_has_video.video_id = t.id
                              JOIN page on page_has_video.page_id = page.id';
            $criteria = $this->getCriteria($join);
            $criteria->order = $order;

            $dataProvider = new CActiveDataProvider('Video', array
                (
                'criteria' => $criteria,
                'pagination' => array('pageSize' => 10),
            ));

            $this->render($action, array('videos' => $videos, 'dataProvider' => $dataProvider,
                'index' => $isIndex, 'title' => $title));
        }

        public function actionIndex() {
            $this->renderVideos('index', 't.id desc', 'New', true);
        }

    }
    ?>

_vidSubsection.php

    <?php
    $lw = $this->widget('zii.widgets.CListView', array(
        'dataProvider' => $dataProvider,
        'itemView' => '_video',
        'pager' => array(
            'cssFile' => Yii::app()->baseUrl . '/css/clistview.css',
            'header' => false,
            'firstPageLabel' => '<<',
            'prevPageLabel' => '<',
            'nextPageLabel' => '>',
            'lastPageLabel' => '>>',
        ),
        'summaryText' => '',
        'sortableAttributes' => array(
        ),
            ));
    ?>
    </ul>

_video.php

    <li class = 'videoItem'>

        <div class="videoSeen">
            <img src="<?php echo Yii::app()->request->baseUrl; ?>
                 /images/eye.png"  alt="videne" title="Seen" class="seenImage" />
            <span class="seenValue">
    <?php
    $seen = $data->seen;
    if ($seen == NULL) {
        $seen = 0;
    }
    echo $seen;
    ?>
            </span>
        </div>
    </li>

0 个答案:

没有答案