Load the first N pages when Posts_page=N

Hi there,

To make infinite scroll works properly with the back button. I need want my dataProvider loads multiple pages at first.

for example: http://www.123.com?Posts_page=2 right now loads 10 items from page 2, but I want it to load 20 items from both page 1 and page 2.

So http://www.123.com?Posts_page=8 should load 80 entries from page 1-8 all together.

How can I achieve this?



Any ideas?


anyone please…

I’m not sure I got you but if I did it try ‘pagination’=> 20… on search function…

return new CActiveDataProvider($this, array('criteria'=>$criteria, 'pagination'=>20));