I have a view with 20 records, displaying 10 records on each page. I have a field check-box with custom handler to check and uncheck each record. I am using the $this->view->results to loop through all the records of view to check or uncheck on different events. This logic is working fine.
Now, I have added a new button to select all the records of view i.e. 20 records of both pages. Is there a way I get all the records of view with paging. In my case I want to get/select all the 20 records which are displayed on two pages. If I print $this->view->results, it has only 10 records which are displayed on page 1. Is there any view array element which have all 20 records?


If you don't mind installing another module, try Views Bulk Operations. Views Bulk Operations (often abbreviated VBO) allows you to add "select all on page/select all everywhere" checkboxes and also offers additional functions such as using batch API to process operations when there are too many to do at once (if you had 20,000 records instead of 20).

Node One has a tutorial on VBO.

  • 1
    Thanks Patrick for your suggestion. I will start using this module soon. Some of my friends also suggest me same. As of now I have fixed the issue by $view = views_get_view('payment_schedule_students'); $view->set_display('payment_schedule_students_select'); $view->set_items_per_page(0); $view->execute();$view->result – Umar May 4 '12 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.