user1201705
user1201705

Reputation: 5

Hide pagination button in CListView but donot disable them

I am using yii framework. I want to hide pagination button of CListView widget but not disable them so that i can automatically trigger the request for next page by clicking them via javascript when user finish processing the list items. I tried enablePagination=>false but it remove the links to next pages too. I tried to hide them through javascript onLoad. Its working fine but in case the page load slowly I can see the pagination button. Is there some standard way to hide them ?

Upvotes: 0

Views: 1383

Answers (1)

Terminal
Terminal

Reputation: 1999

You can use pagerCssClass property of CListView to define separate class for pagination button if i am getting your problem right.

$this->widget('zii.widgets.CListView', array(
                    'dataProvider'=>$dataProvider,
                    'template'=>"{items}\n{pager}",
                    'pagerCssClass'=>'hideButton',
        ));

CSS

   .hideButton{
    display:none;
    }

Upvotes: 1

Related Questions