2

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?

1 Answer 1

2

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
  • 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
    Commented May 4, 2012 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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