Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300758

Add 'items per page' pager option to views/ajax call

$
0
0

There is a way to render a views from jquery with an ajax call, It is a pretty feature, but there is no any option to add items_per_page while calling the views through ajax. I recommend a way to add one more option to add items_per_page as an arguments so we can manage the pager smoothly.

$.ajax({
            'url': Drupal.url('views/ajax'),
            'type': 'POST',
            'data': {
              'view_name': 'resource_casestudy',
              'view_display_id': 'block',
              'view_args': viewArgs,
              'item_per_page': limit
            },
            'dataType': 'json',
            'async': false,
            'success': function (response)  {},
     });

Viewing all articles
Browse latest Browse all 300758

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>