Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [paging]

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

0
votes
0answers
62 views

Clean URLs for pager links?

I need to change the pager links from taxonomy/term/12?page=1 to taxonomy/term/12/page/1, in Drupal 8. I know about the Cleanpager module, but it works only in D7. Its development snapshot for Drupal ...
0
votes
1answer
18 views

Within a View, How do i paginate the content found inside a single Multiple file field, i.e. inside one node

Hopefully someone can help. I am using a file field and allowing unlimited files within a single content type field called "Video", handled by Media Module. I have created a view per "gallery" of ...
0
votes
0answers
31 views

Pagination with entity

Don't know where to start and not sure if there is already some builtin functionality that can be used. I have an entity and items on the page are rendered with class ItemEntityListBuilder how can I ...
1
vote
1answer
125 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 ...
0
votes
1answer
47 views

How can I populate multiple blocks on a paginated page?

my problem seemed simple to solve and how to do it. But the paging did not work properly .. As we see in the images, we have: Main block with an image and description. It only shows 1 element. ...
1
vote
1answer
209 views

How to add pagination to programmatically rendered search result template

I am trying to implement the pagination in drupal 8 custom page. I have a custom array which I am rendering using theme, I need to add pagination for it. $internal_result = array_merge($...
2
votes
0answers
42 views

How to change the pagination position

I have created a custom block using Entity Query with pagination to get the data and everything works fine with $render[] = [ '#type' => 'pager', ]; But I can find a way to change the position ...
2
votes
1answer
158 views

how rewrite pagination URL views for SEO?

i am trying to rewrite the views url pagination : /mypath/cat?page=1 to /mypath/cat/1 or > /mypath/cat/page/1 or /mypath/cat-1 cat is a taxonomy term. I have tried to rewrite url with Drupal\...
0
votes
1answer
140 views

Add mini pager and infinite scroll to a view

I have a view where at first 1 item has to show. On click of 'load more' next item has to show and so on. For this i have installed 'infinite scroll module' in drupal 8. Now after showing four items, '...
5
votes
1answer
722 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-...
1
vote
1answer
137 views

Rest API pagination

I am using drupal 8.5 and have tried everything people say to get pagination working, but it does not over rest api. I have 2 news articles, and I set the page value to 1 per page. I have tried ...
0
votes
1answer
230 views

how to get count of total record

I'm using drupal pagination here i have add some part of my code pagination is working perfect while I'm trying to get the total no of record it is always displaying 10. As i understand i have set the ...
0
votes
2answers
316 views

How to add a pager at both the top and bottom of a View

How can I do this for Drupal 8? I have searched for a solution but I didn't find anything yet, I hope some one here can help me. I have this "pager.html.twig" (from the clasy theme) template in the ...
-1
votes
1answer
46 views

How to fix Filter selections on VIEW result pages

1] I am using Exposed Filters (Page Display - not Block Display) in a view. 2] Sorting by three parameters: Materials, Machines, Industry(s) 3] Using Paging to deliver Results 4] Filters have "...
0
votes
0answers
24 views

theme('pager') incorrect links

I have a content type that has a template to display a view of photos. The pagination links exist, and the view is working correctly, but when I am calling theme('pager') in my node--name--photos.tpl....
0
votes
0answers
247 views

Is there a way to add pagination to only a tableselect returned from ajax callback? [duplicate]

Have a simple form with few inputs as a filter criteria. Selecting these and clicking on a submit button executes a callback function that returns a table and a pager. Code: //submit button $form['...
0
votes
0answers
41 views

How to add pagination in a block created from a custom module?

I have made a very simple block that displays an array of strings as a list. I am achieving this by implementing hook_block_view() in my .module file. Right now the list displays ok, but I would like ...
0
votes
1answer
166 views

Using ajaxComplete in view pagination

I have (drupal 7) view where I have pagination with Ajax enabled. When any pager item is clicked I want to perform certain thing after the view is reloaded with ajax. I am trying the following code: (...
0
votes
0answers
36 views

Query not returning all rows (Tablesort/Pager)

I have a problem with my query, this one not returning all rows from my database $query = $db->select('projection.ecriture', 'ecr'); $query->fields('ecr', array('date', 'datedelecheance', '...
0
votes
0answers
45 views

Pager not rendering in custom twig template [duplicate]

I have custom twig template for product listing Below is my code in controller $query = \Drupal::entityQuery('node') ->condition('status', 1) ->condition('type', 'product') ->pager(1) ->...
0
votes
0answers
154 views

Drupal Ajax pager

Am looking for a solution to implement $form['pager'] = ['#type' => 'pager']; into AJAX callback (without reloading the page). I have read alot of posts concluding there is no a drupal way to do this ...
0
votes
0answers
73 views

Caching problem: Why does the pager of my pages module not work?

I am using the pages module in combination with the view module on the front page of my website. This worked until recently, when my pager started to behave strangely. The pager does not work anymore ...
0
votes
1answer
35 views

Why don't all pages of content show up in the pagination beneath main content?

On a Drupal 7 site, I have several pages' worth of content, articles that are set to "published" and "promoted to front page". The page numbers underneath the main content part of the block show pages ...
0
votes
1answer
363 views

Views pager labels not translated

I have a site (v8.4.2) with all core language modules enabled, 3 active languages, English is the default. The pager labels (e.g. "Last »") for my own Views are not translated although the string "...
2
votes
1answer
806 views

Views Rest Export and sending page numbers in it's response

I have a paginated views using "rest export" and I'm using it to show that data on mobile app, everything works fine, but I want to know how many pages exist on that endpoint to show page numbers in ...
1
vote
1answer
81 views

How can I display a block on view page, excluding paginated/paged/pager output pages?

I'm trying to use Context to display a block on a view page path, e.g. /view, but exclude it from the paged output, e.g. /view?page=1. The path exclusion tools in Drupal 8 don't work with the query ...
-1
votes
1answer
94 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
1answer
93 views

Attachment pager

I have a Drupal 7 page View which returns one result while an attachment View (with offset 1) returns the rest. (First result displays title, body, image, etc. while the following rows only return ...
0
votes
1answer
727 views

How to add a pagination on my twig file using entity query(Drupal 8)

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 ...
-1
votes
1answer
202 views

Custom pagination with template

So I have a custom module where there is a basic function that returns an array of data where I try to add a pager. I then call the function in the template.php the pass a custom variable to my ...
1
vote
0answers
382 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()-&...
-1
votes
1answer
38 views

Why doesn't my first blog entry show up on my last page?

On a site that I created a few years ago, my very first blog post does not show up when I browse from the front page to the last page. All my other blog entries seem to show up there. When I manually ...
-1
votes
1answer
65 views

Modifying [current-page:page-number] token

I am using [current-page:page-number] token in title and metatag description. Pager in views, gives second page of view as "Page 1" and token gives first page of view as "Page 1". This creates ...
0
votes
1answer
146 views

How to display a specific page number of a views mini pager?

I'm displaying a view on a pager with a mini pager. It has total number 15 pages. I want to display page number 5 by default. The the next link will point to page number 6 and the previous link will ...
0
votes
1answer
36 views

How to assign a new icon to a pager?

The current default pager in Views Paging Drupalgap is easily neglected. Can I assign it a new icon or create my own pager button? Currently, what I know is to put it at the top or the bottom ...
1
vote
0answers
200 views

How to add a class for anchor tag for particular view using pager.html.twig?

I have been trying to add class for anchor tag, but I could not find the right way to achieve this. I want to add class for particular pager in view. There is no pager.html.twig for particular id. I ...
-1
votes
1answer
63 views

How to reuse the query on a node page?

I have a Views page which is a search page based on a Search API index containing a few filters. The results are rendered entities. When clicking one of the entities, I wonder if it is possible reuse ...
0
votes
1answer
388 views

How to add pagination after using hook_views_post_execute() to modify $view->result?

I have successfully used hook_views_post_execute() to remove results I do not want from $views->result. Now, however, I need to paginate the remaining results. The code in my ...
3
votes
1answer
104 views

How do I use paging in a content type containing a paragraph?

I created a content type with just one multivalue field which turns to be an "entity type revisions" (i.e. Paragraphs). I would like to have paging working on this setup (when number of Paragraphs ...
0
votes
0answers
206 views

Infinite scroll In Drupal 7 Views

Hello Friends I want to integrate infinite scroll for my all views in Drupal 7 I have already installed Views Infinite Scroll module with version 7.x-2.0 but it gives ajax error in default drupal ajax ...
1
vote
1answer
2k views

Adding pager to queried content in a custom module Drupal 8

I've created a custom module to get X items using entityQuery, and then display them as a list. I need to limit these and add a pager to click through to the next page, but I cannot find how best to ...
5
votes
1answer
2k views

Pager with EntityQuery

how can I make a pager with the pager class? I could not find anywhere how to do this with the EntityQuery class. I have a pager(10) that displays the last 10 items. I want to make a pager with ...
0
votes
1answer
222 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
1answer
72 views

Two pagers for a single view

I have a view with fields. In fields I have added two rendered node fields with two different view modes teaser and teaser1. I want to add two pagers to this view. One for the first rendered node ...
2
votes
0answers
176 views

Date Pager in Drupal 8

How can I implement a date pager (e.g. as a contextual filter) in Drupal 8 on a custom entity field? It seems to me, that the date_views functionality didn't make it into the core yet, and I can't ...
2
votes
1answer
194 views

Routing custom module with alphabetic pagination

My custom module: - Plugin/Ziektes.php array returns to hook_theme public function build() { $letter_path = 'B'; $path = base_path(); $current_url = Url::fromRoute('<current>'); $current_path =...
0
votes
1answer
216 views

How to add a class to a pager?

I would like to add bootstrap classes to a load more pager, with the views load more module. I am currently using javascript to add it on, but the moment I change the view the classes are no longer ...
3
votes
1answer
319 views

Multiple pagers in single page

Hi I have a page in which I have added 2 blocks in both blocks I have paging,but when ever i click any page number of either a block both the page change simultaneously in Drupal7 $output .= theme('...
0
votes
0answers
58 views

views pager by ajax

I have multiple views in a page. Each of the views has its own pager. When I go to page 2 of one of the views "?page=1" appears at the end of the URL but I do not want it. How can I load whole of the ...
0
votes
1answer
310 views

Search page : display pager on top

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 ...