- Status changed to Closed: outdated
over 1 year ago 3:20pm 16 June 2023 I am closing this as there have been no replies. Reopen it if needed.
I use the following code for task in block view
$.ajax({
url: Drupal.settings.basePath + 'views/ajax',
type: 'post',
data: {
view_name: 'views_date',
view_display_id: 'block_1',
},
dataType: 'json',
success: function (response) {
if (response[3] !== undefined) {
var viewHtml = response[3].data;
$('#question-container').append(viewHtml);
Drupal.attachBehaviors();
}
}
});
If the code brings the view block as planned, it works fine, but there is a problem with the pager, since it does not work or works badly, and pagination does not work with ajax
Steps to reproduce
1- Create views block with names for example:
- view_name: 'views_date',
- view_display_id: 'block_1',
2- Use script in you theme
3- Create a block or add a div in the node in the body field the attribute in this case is "#question-container" at the end it should look like this
4- Add a couple of contents to be able to filter them in the view
5- Try pager
Closed: outdated
9.5
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I am closing this as there have been no replies. Reopen it if needed.