Skip to content

TbThumbnails and ajaxUpdate #172

@CarlosAdrianM

Description

@CarlosAdrianM

I had this problem with Bootstrap TbThumbnails in Yii:

Pagination shows well when the page is initially loaded, but if we click in the last page link then it shows all the records instead of just one page of records.
The Link Pager buttons are initially shown under the records, like we set in the 'template' parameter, but when we click in the last page link it moves above the records instead of under them.

The code in the view (the wrong one):

<div class="row-fluid">
<?php 
    $this->widget('bootstrap.widgets.TbThumbnails', array(
    'dataProvider'=>$dataProvider,
    'template'=>"{items}\n{pager}",
    'itemView'=>'_view',
    )); ?>
</div>

But if I use TbListView it works fine:

<div class="row-fluid">
<?php 
    $this->widget('bootstrap.widgets.TbListView', array(
    'dataProvider'=>$dataProvider,
    'template'=>"{items}\n{pager}",
    'itemView'=>'_view',
    )); ?>
</div>

It also works if I set ajaxUpdate = false:

<div class="row-fluid">
<?php 
    $this->widget('bootstrap.widgets.TbThumbnails', array(
    'dataProvider'=>$dataProvider,
    'ajaxUpdate' => false,
    'template'=>"{items}\n{pager}",
    'itemView'=>'_view',
    )); ?>
</div>

Any explanation? Any know problem with ajaxUpdate?

Thank you for the Yiistrap extension, it is great!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions