Hello, I used the method views_json_get, and I think that a quick and good enhancement for this method would be to support pagination.

Here is how to do it :

1) change the method signature from

views_json_get($name, $display_id = 'default', $args = array(), $raw = FALSE)

to

views_json_get($name, $display_id = 'default', $args = array(), $raw = FALSE, $current_page = 0)

2) just add after

 if (!is_object($view)) return NULL;

this single line

  $view->set_current_page($current_page);
CommentFileSizeAuthor
#1 1183320-1_jsonget_page.patch886 byteszeip

Comments

zeip’s picture

Version: 6.x-1.0-beta2 » 7.x-1.x-dev
Issue summary: View changes
StatusFileSize
new886 bytes

Attached is a patch for this in 7.x-1.x.

  • ZeiP committed 5a02cc0 on 7.x-1.x
    Issue #1183320 by ZeiP: add current page attribute to method...
zeip’s picture

Status: Active » Fixed

I committed this, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.