When calling view.getView for a View that has no pager and unlimited results you only get 10 results/nodes displayed. For some reason it automatically uses the default pager if you specify either an unlimited number of results, or to not use a pager at all inside your view.
As a very quick workaround I'm forcing the view to choose 0 as the number of results per page by inserting the following line between two existing lines in views_service.module.
$view->set_arguments($args);
$view->set_items_per_page(0); // inserted this line
$view->execute();
Hopefully someone knows the real way to pass on the paging/limit information from the view when calling it via the views service but for my purposes I'm never paging so this works fine.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | servies_views_getview_advanced.patch | 2.57 KB | dawehner |
Comments
Comment #1
dawehnerI created a patch for version5 of the views service module, which enables all advanced featuers of views_build_view
Comment #2
snelson commentedI've committed the patch to D5. It has been modified to exclude the "use_pager" parameter which didn't seem to help anything. With use_pager on, setting a page value didn't do anything.
Comment #3
dawehneryes but this is the function itself, i'm not sure why but i had this "bug"(feature ;) ) with this function a lot of time