Questions tagged [paging]

The process of splitting the result of a query on different pages is called, in Drupal terminology, paging.

Filter by
Sorted by
Tagged with
1 vote
1 answer
673 views

Views Infinite Scroll and back button issue

I am using Views Infinite scroll module, Drupal 7. When i click on an item and go to next page and then click Browser back button, it takes me back to the start of the page. When i click browser back ...
0 votes
1 answer
1k views

Table Pager Rendered in an Ajax Callback Shows White Page

I have the callback function below that renders a table with a pager. Every page of the table is 20 rows. Below is the code: function myid_print_all_submitted_id_callback($form, &$form_state){ ...
0 votes
2 answers
599 views

How can I create the views pager on top and bottom of the view?

I need two view pagers / pagination to sandwich the view content or view results. Is it possible to duplicate view pagers/pagination ? What i've done is just printed out the pagers in the template ...
2 votes
1 answer
385 views

Paginate results of entity reference widget type

I have entity reference field with checkboxes/radio as the widget type. The issue is the I have hundreds of nodes and this results in a having a big list. Is there a way to paginate the results or ...
0 votes
1 answer
598 views

Pagination for Views RSS

I'm using Views RSS module to generate a custom RSS feed. I want to be able to limit the results by adding ?offset=50&limit=50 . How could I achieve that? Is there any Views plugin I could use? ...
0 votes
1 answer
1k views

Views pager shows an incorrect current page

I have a page view displaying a table of fields with a few exposed filters. This page view also has a full pager (8 items per page). The view is not using AJAX, nor does it have any caching enabled (...
1 vote
1 answer
524 views

Paginated ajax form with non-sql data

Using Drupal 8 I created a form to load data from a webservice with ajax below the form. Now i'm trying to add pagination to result, but the paginator is not been loaded, i'm doing something wrong?. I'...
0 votes
2 answers
763 views

How to display the pager on top and bottom of a custom search results page?

I have used the core Search Page functionality in Drupal 8 to built a search engine on my site. The pager is displayed at the bottom by default. How can i display the pager on the top also? Note: I ...
0 votes
1 answer
967 views

Embed Views remove pager

I have embedded view in a node with following code: <?php $view = views_get_view('articles'); $view->set_items_per_page(1); $view->set_offset(2); print $view->preview('page'); $view-&...
0 votes
2 answers
2k views

How to change pager class to view

I have HTML desing of pagger ,How to I assign my own class to pager in side view ?I dont have any idea about it so will you plese tell how can I ?
0 votes
2 answers
1k views

How do I remove the ellipsis button in the pager?

I have a view with video and have replaced the links to different pages with a button. However, when there are many videos, an ellipsis (...) appears floating, and I want to remove it. I have the View ...
0 votes
1 answer
1k views

Custom module Pager does not work with Ajax filter

My custom module uses an Ajax enabled drop down to allow users to filter images. There is also a pager attached to the query. The pager works fine when all the data is displayed i.e. no filter applied ...
0 votes
1 answer
694 views

Always show next page link in pager

function mythemename_pager_next($text, $limit, $element = 0, $interval = 1, $parameters = array()) { global $pager_page_array, $pager_total; $output = ''; // If we are anywhere but the last ...
1 vote
1 answer
533 views

Change search results pager to mini pager?

How to change search result's pager to mini pager. I want to change default pager to mini pager in that search result page. Please help me. Thank you.
0 votes
2 answers
620 views

Disabled AJAX paging with embedded views when used in Views template files

I am using a View in two different pages: page--front.tpl.php and views-view-grid--inside--page-1.tpl.php which is a custom display of a view. This is the code that is used in both of these print ...
1 vote
2 answers
980 views

Is it possible to get the last number of a views pager to display after and before the elipses?

I'm trying to create a custom pager similar to the Amazon pager: < 1 2 3 4 ... 82 > and after a certain point: < 1 ... 7 8 9 10 ... 82 > But, I cant figure out how to display the last ...
8 votes
2 answers
2k views

Paging a view based on a grouping field?

I'm upgrading a site I created 2 years ago from D6 to D7. In that site, I have a view of items that are grouped according to year, so that the items for each year show up on a separate page -- you ...
0 votes
1 answer
424 views

Views Pager, Can I change Items per page dynamically as provided input?

Is it possible to send Items per page limit in query string of view page url and get records according to that?
0 votes
1 answer
600 views

Multiple pagers in one page

I have a view with two separate displays that is used in one single page. Both the displays are using a pager. To get things working I set a unique id for each pager under pager options. This works ...
4 votes
1 answer
702 views

Unlimited field collection pagination in node edit page

In my node I have a field collection which is set to unlimited. How to enable pagination for node edit page, where all items from that field collection are displayed? For display there are couple ...
0 votes
1 answer
919 views

Pagination isn't working

I have a homepage view called FrontPage. Currently, it shows the pagination link like "1, 2, 3 Next->" as it should; when I click on Next, it goes to http://example.com, not http://example.com/page/1/...
0 votes
1 answer
662 views

Pager not working when $form['table'] is called with AJAX

For a statistics page I let users select the right file in a select list. After that I generate a table with stats. This table also has a pager (that worked without the ajax part). Now I did ...
1 vote
2 answers
1k views

Pager labels aren't translated

I have a site using Drupal 8.4.1 with all core language modules enabled, 3 active languages, and where English is the default language. The pager labels (e.g. "Last »") for my own views aren't ...
1 vote
1 answer
62 views

How can I render comment pager on the top and the bottom of the comments portion of the page

When comments are numerous on a node and you have a high comments per page setting, you have to scroll a lot to get to the pager. My users have requested pager at top as well as bottom of the comments ...
6 votes
1 answer
3k views

Clean URL pagination (rewrite ?page=parameter)

One of my client works with an SEO agency and they ask me to remove the pagination parameter ?page=x (generated by the Views module) and rewrite it like this: Before: /my-page?page=1 After: /my-...
2 votes
1 answer
335 views

I am trying to add a simple pager to my controller, I have managed to get the row limit (5) to be printed but not to see the next or the previous [duplicate]

<?php namespace Drupal\drupal_block\Controller; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Controller\ControllerBase; use ...
-1 votes
3 answers
495 views

Add All link on view pager

Is there a way to add a Show All Link on my view pager. I have a Block View. I would like to be able to add an All Link button when the number of Items reach 5. I do not need the pager "Next, last ...
-1 votes
2 answers
2k views

How do I add a pagination on a template file?

I'm currently new with Drupal 8 and right now I'm trying to output a pagination on my twig file using entity query. So far this is my current code that I came up with. My goal is output the news ...
3 votes
5 answers
2k views

Is there any way to adjust the items per block options?

In Drupal 8, whenever you create a view block, you have the option to specify the number of items displayed in that view block which is awesome. Currently, you can choose between 1, 5, 10, and 20. Is ...
0 votes
1 answer
688 views

How to theme a pager with twig?

I've added a pager to a custom page rendered programmatically from a controller. I want to customize the pager. How can I do it without overriding the standard pager twig? This is the hook_theme: ...
0 votes
0 answers
34 views

All pagers stopped working

I have a Drupal 7 site built in 2014 with numerous pagers built in. Most of the pagers are in custom modules and are rendered using the following code. $pager = theme('pager', array('quantity' => ...
0 votes
1 answer
88 views

Print specific page of a paged node

I am using Print module to print a Drupal node. Recently users have asked the ability to print a node in form of individual pages. For example if a paged 'Drupal' article spans on 5 pages, user ...
2 votes
2 answers
3k views

How can I modify pagination to restrict shown page numbers?

I have a pagination for list of articles within a Drupal site e.g.: <<first <previous ... 3 4 5 6 7 8 9 10 11 ... next> last>> So at the moment there are always nine page links ...
4 votes
1 answer
1k views

Views with ajax get current node in hook_views_query_alter

The view has on offset based on a value set in the Basic page node. function domain_config_bu_views_query_alter(ViewExecutable $view, QueryPluginBase $query) { if($node = \Drupal::routeMatch()-&...
-3 votes
1 answer
111 views

Search and pagination in media popup don't work properly [closed]

In the /admin/content/media page, I have more than one button for the pagination. The search is working properly. When I edit a media on some node, in the popup, I only have one button in the ...
2 votes
1 answer
614 views

I have issues with multiple paged tables in pages with multiple tabs (JQuery UI tabs)

I have a series of pages that provide paged tables inside of tabsets. Using the Tabs module, I get jQuery UI tabs, and I am using that to create pages with multiple horizontal tabs; inside those tabs ...
0 votes
1 answer
1k views

One view for multiple pages? [closed]

I have nodes from a content type that are put in a paged view (show 1/page) You can see it here: http://stage.e-clear.eu/en/chemicali%C3%ABn http://stage.e-clear.eu/en/Energie As you see this are ...
1 vote
1 answer
154 views

How do I force the pager to update?

I have a custom form built with the Form API. The general flow is: Build and display form Get user input Rebuild and form query based on user input with added $query = $query ->extend('Drupal\\...
2 votes
2 answers
1k views

Getting total count of query in combination with pager

My code: $query = \Drupal::entityQuery('node'); $query->condition('status', 1); $query->condition('type', 'news'); $query->pager(9); $count = $query->count()->execute(); However my $...
1 vote
1 answer
1k views

Creating a table with pagination in a Node Edit form

I have a content type article that has a field for Category. In order to help our editors find related articles, I included a table on the article Edit page that pulls in other article entities that ...
7 votes
2 answers
15k views

How to add Pager to a custom page?

I have a list of items which is fetched from an REST API and displayed in a page 10 at a time. These items are not stored in Drupal database in any way. I managed to have a basic pager which is just a ...
5 votes
3 answers
15k views

Views AJAX pager not working, though AJAX is enabled

I have a view of 6 news items on my front page. These get rendered in teaser mode. I enabled a pager of 6 items, and also enabled AJAX as you can see in the settings below. AJAX is enabled in the ...
0 votes
1 answer
100 views

How do I change pager (# of items) for one page display in a view?

I have a view that will have about 7 different display pages. Some of the pages will have a different amount of items displayed on that page. When I'm on my Publication Page (display name) and change ...
6 votes
3 answers
4k views

How can I change the number of items in a view only for the first page?

I'm trying to build a view with a different number of items for the first page (2 items) than the others (3 items). How can I build it to avoid skipping items ? I made tests using hook_views_pre_build(...
2 votes
2 answers
593 views

Using migrate with a multi-page / paginated source

I have a working module pulling a JSON feed into Drupal using the Migrate module. However, the feed is paginated, and I am only getting the first page of results (ordered DESC on creation, so giving ...
2 votes
1 answer
1k views

How can I implement paging for a custom query plugin which displays data from an external API?

Hi I have a requirement to display the data from external api but should not be imported into any entities. What I did is I have written a custom view query plugin which displays the data from ...
0 votes
1 answer
94 views

Can I add pagination to individual blog posts in my twig file?

I have a views page which has all the blog articles, and you can click on a link to bring you to a single blog page. On that single blog page I want to be able to add buttons for Previous and Next ...
0 votes
0 answers
123 views

Views pager not printing

I am working on a project in Drupal 7 and the pager is not working properly. It will display on the block but not on the page no matter what I do. I have even tried changing the pager_id and that ...
4 votes
2 answers
113 views

Alter comment pager to jump to comment section right away?

I set up a content type and a specific comment type for this content. I set the comment pager to display 10 comments per page. When I now use the pager, I get redirected from the node URL itself www....
2 votes
0 answers
124 views

Different 'Items Per Page' on different pagination while using 'views_infinite_scroll' module

I am using views_infinite_scroll module to load more nodes with 10 nodes on every click and views AJAX is enabled. I am working on a requirement like as, I have 100 total nodes and getting in a view ...

1
2 3 4 5
8