Hidden Pagination summary text

∥☆過路亽.° 提交于 2019-12-08 04:55:54

问题


I use CGridView in Yii to create tables.

I would like to show my table with pagination but hide the summary text at the top, which indicates the number of page restance (Displaying 1-4 of 4 results.)

Is that possible? thank you

Sorry for my English


回答1:


There is a template option. By default it equals {summary}\n{items}\n{pager}

If you override it in your gridview config, you'l be able to remove summary section:

$this->widget(
                'zii.widgets.CGridView',
                array(
                    Your options here ...
                    'template' => '{items}\n{pager}',
                )
            );



回答2:


Another option is to set the CGridView summaryText value to false




回答3:


Because YII uses CListView, it also add a certain summary class CSS in the asset folder. So to combat this, simply override the css.

Add this to your CSS.

#yw0>.summary{ 
    display:none;
}


来源:https://stackoverflow.com/questions/14978000/hidden-pagination-summary-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!