Add an Option to mention items per page to views/ajax call

Created on 23 July 2020, over 4 years ago
Updated 11 January 2024, about 1 year ago

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)  {},
     });
Feature request
Status

Needs work

Version

9.5

Component
Views 

Last updated about 4 hours ago

Created by

🇮🇳India leopathu

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024