Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yii2 remove summary/count from ListView

Tags:

php

listview

yii2

When I use ListView I it always does a count. For example says something like:

Showing 1-1 of 1 item.

My results/items are above. How can I remove this?

Current ListView code

<?=  ListView::widget([
        'dataProvider' => $dataProvider,
        'itemOptions' => ['class' => 'col-xs-6 col-sm-3'],
        'itemView' => '_index',]);
    ?>
like image 424
con322 Avatar asked Mar 06 '15 22:03

con322


2 Answers

Found my answer used the following line:

'summary'=>'', 
like image 136
con322 Avatar answered Sep 20 '22 23:09

con322


You could also use:

'summary'=> false

I prefer false instead of empty string for better readability or in case you want to use a boolean expression (like: $row_count > 0).

like image 30
Ibrahim.H Avatar answered Sep 23 '22 23:09

Ibrahim.H