Hi,

I am using custom pagination in views results(not the one which view provides). I am getting all the records using below code -
$view = views_get_view('trending_tags');
$view->set_display(NULL);
$view->pre_execute();
$view->execute();
$arr_trending_tags = $view->result;
I am getting all the records even if i give pager option in views UI for this particular view. I have tried using below code as well -
$view->set_items_per_page(3);

Because my pagination is custom so it will not take this set_items_per_page() params.

If there are 100 records are available in my DB for this view but I want to fetch only 3 usnig some kind limit which cna work properly with my pagniation.

Pleas suggest your ideas.

Thanks.

Comments

nevets’s picture

You might want to look at one of the existing custom pager modules for views to see how they work.

hemant_gautam’s picture

Thanks Nevets. Can you please suggest me some of the module for custom pager?

nevets’s picture

Pager comes with a variety of pagers.