$dataprovider and pagination

Hello,

is there a way to apply the pagination ajax to $dataprovider without using a widget?

I am using a foreach to loop through the $dataprovider,


foreach ($dataProviders as $key => $value) {

...

}

how I can display only 20 and add the pagination in the bottom of my view?

Please help, Thank you.

Or without pagination, but with "Load more" button?

Please help! :)

what’s the problem of using a widget? widgets are cool…

Totally confused. Why are you using a foreach loop? Why wouldn’t you use a CListView or a CGridView? Can you elaborate here with a use case?

because I am using for loop of widgets… so the page will show many widgets and i would like to show 5 per page ( 5 widgets per page)

Hello,

why don"t you just change your id of widget ?

and if you want ajaxbutton to load your item : http://www.yiiframework.com/doc/api/1.1/CHtml/#ajaxButton-detail

Sorry if i misunderstood .