Skip to main content

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
7 votes
2 answers
16k 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 ...
Malabya Tewari's user avatar
6 votes
2 answers
7k views

EntityFieldQuery display pager

How do I display pager using EntityFieldQuery for fetch results? I can't find complete example. I am doing simmilar to: Sortable, paged table retrieved using EntityFieldQuery But I miss part to ...
NenadP's user avatar
  • 1,517
4 votes
4 answers
19k views

Change views pager programmatically

I'm adding nodes to a view programmatically and i'm altering the pager 'x out of y' by setting the folowing in hook_views_pre_render: $view->query->pager->total_items = $count; $view->...
adevms's user avatar
  • 131
5 votes
2 answers
15k views

In drupal 7, How to override theme_pager?

I am using drupal 7 and zen theme. And am not able to override the theme_pager using zen_pager function in template.php. Any suggestion pls?
Vinoth's user avatar
  • 101
3 votes
2 answers
5k views

how to change views pager links?

I am using the full pager in views module. I am displaying 40 items per page. The full pager display links like this 1 2 3 4 5 next last I want to change it to this 1-40 41-80 81-120 next How will ...
Ahmad's user avatar
  • 2,835
7 votes
2 answers
15k views

How to customize pager

I have a code, that outputs a standard pager: print theme('pager'); it outputs this: <h2 class="element-invisible">Pages</h2> <div class="item-list"> <ul class="pager"><...
user4035's user avatar
  • 1,896
5 votes
1 answer
2k views

Views, multiple pagers on same page

I have multiple views with pagers on same page. But all of the pagers using the same GET argument "page", so when user chooses a page in first pager, all of the pagers changing their state to those ...
breethe's user avatar
  • 401
2 votes
3 answers
2k views

More than one pager in the same page

I have a Page that contains two views one that list the latest news and the other list the latest event The problem now is that each view has a pager but when I change the page of one of them both ...
Ahmed's user avatar
  • 1,429
1 vote
2 answers
2k views

Get value for drupal date pager next or prev or current

I am looking around a way to get the date pager next/prev/current value inside the current view.I am listing events in a month and have used date pager.Display is of month type so in header it shows ...
arpitr's user avatar
  • 7,846
1 vote
0 answers
592 views

Use a content type's field as a pager item in Views

I'm creating a very custom slideshow with views. It has a content type that has a photo field, some text fields and a thumbnail field. I would like to have my thumbnail field set as the pager items. ...
user4937's user avatar
1 vote
2 answers
2k 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 ...
JASHIROU PRO TIPS's user avatar
1 vote
1 answer
383 views

How to add pager at the bottom which allow shifting between views?

I am looking for how to add pager in the complex set of view content. In my case, - I have 5 views with different titles, and have 10 items in each views. - Now, I want to divide each view in 2 ...
CodeNext's user avatar
  • 3,729
6 votes
1 answer
4k views

How do I use theme('pager')?

I have problem to understand how I should use theme('pager') as explained on EntityFieldQuery display pager. I can't make it work (display pager and links to resulting pages). Does pager(10) in ...
NenadP's user avatar
  • 1,517
6 votes
1 answer
7k 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 ...
Luc - K's user avatar
  • 69
6 votes
3 answers
5k 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(...
tostinni's user avatar
  • 9,123
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()-&...
mgoubert's user avatar
  • 377
4 votes
1 answer
3k 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 ...
Shirin Abdolahi's user avatar
4 votes
2 answers
4k views

Howto print out the pagination for EntityFieldQueries?

I have this code that uses an EntityFieldQuery object: $query = new EntityFieldQuery; $query ->entityCondition('entity_type', 'node') ->entityCondition('bundle', 'yacht') ->...
nocksock's user avatar
  • 689
3 votes
1 answer
2k views

How do I iterate through views result with pagination in a template file?

I am using Drupal 7.8, built a custom cck type, populated it with content, and created a view with full pager of 10 items per page. I'm modifying the views theme Row Style Output - views-view-fields....
Robbase's user avatar
  • 443
3 votes
2 answers
2k views

Multiple blocks on single page, pager issue

I have 3 blocks made by views on the front page. Each have 4 of the newest node teasers showing with a pager to see the rest. However, when I click on one of the pager's next button, it will load the ...
ril44's user avatar
  • 339
3 votes
2 answers
3k views

views pass argument for number of records to display to pager contextual filter?

Drupal 7. Is it possible to pass an argument to the contextual filter to limit number of items to display in a View from the UI? IOW: can you pass an argument that replicates the Number Of Items ...
jchwebdev's user avatar
  • 590
3 votes
0 answers
164 views

Change views items per page dynamically [duplicate]

Possible Duplicate: How do I limit the number of Views results on specific pages? I have a view that I use for showing different items on my website. It is a very simple view that accept taxonomy ...
Luca's user avatar
  • 479
3 votes
1 answer
2k views

Adding Pagination to to custom form block results

I have created a custom block that has a form which has a list of result and I wanted to know how to add pagination to the results Thanks for any help on this Colin
colinam1992's user avatar
3 votes
1 answer
2k views

Paginate views by first letter of Node title

I'm creating a View of staff profiles. It's a simple list of Node's Title filed (which happens to be the person's name. Instead of paging by number of items, I want to group them by first letter of ...
Rick's user avatar
  • 2,984
2 votes
2 answers
2k views

how to add a class to the widget pager of views slideshow

I want to add a class to the widget pager of views slideshow. I found the function in the file /theme/views_slideshow.theme.inc wich theme the wrapper of the widget function ...
flocondetoile's user avatar
2 votes
1 answer
997 views

How to give pagination for Rest Service data

I am using Rest Service and pull the data from another non drupal db. I wrote custom module with two form elements and render that data (rest service call) and display using theme table. I wrote $...
Manu's user avatar
  • 193
1 vote
2 answers
6k views

Programmatically Change Pager "Items to Display" value?

I would like to create a custom form to allow a website admin to quickly change the number of "Items to Display" for a particular block display for a particular view, but I don't have a clue how to ...
carsonw's user avatar
  • 135
1 vote
2 answers
601 views

Pager disappears when adding "GROUP BY" in the SQL query

Drupal pager disappears when I add GROUP BY to the query. This code works. $countSql = "SELECT COUNT(*) FROM journal "; $sql = "SELECT * FROM journal"; $result = pager_query($sql, 1, 0, null, ...
Kamran Akhter's user avatar
1 vote
1 answer
969 views

Pass no. of pages arguement to Drupal views pager

I have created views with display as page. In pager there is option to set no. of page to show. How can I set this dynamically by passing it through url? I can pass the page using ?page=2 and offset ...
esafwan's user avatar
  • 1,348
1 vote
3 answers
2k views

Comment pagers in D7: They appear even when the page has only 1 comment!

I have this Drupal 7 site (updated from my D6 site). I have nodetypes wich allows comments. I have the pager for comments at the very end of the comment lists that shows (as you can imagine) the ...
Rosamunda's user avatar
  • 1,289
1 vote
3 answers
744 views

Get next node in nodequeue

I have a nodequeue named work_order. If I am in a page which belongs to this queue, is there a way I can get the next node that will be there in the nodequeue? I looked at most of their API ...
open_sourse's user avatar
1 vote
0 answers
926 views

Views pager - start paging from 1

Views pager starts with 0 (URL GET argument "page" has value 0 for first page). Is it possible to set the pager, so it will start with 1? I think it is more user friendly. (if pager is starting ...
tomas.teicher's user avatar
1 vote
2 answers
582 views

Ajax not output to Ctools modal when using pager

So in my continuing quest to display a form with Solr search results in a Ctools modal window and use a pager, I've managed to get everything to display fine after the initial search, but when I use ...
wonder95's user avatar
  • 1,201
1 vote
2 answers
916 views

Pager doesn't work in views block if views php field is used

I have a views block that shows nodes in some conditions. The views has pager and normally it works but if I use Global: PHP field the pager doesn't work and it only show the first page. The Global: ...
herci's user avatar
  • 2,160
1 vote
1 answer
46 views

taxonomy terms view with custom alphabar (for Spanish)

I have a lot of views displaying taxonomy vocabularies with alphabar, the problem is that all the alphabar are by default showing the order for English alphabet, Spanish has ñ and accented letters, at ...
Andrés Chandía's user avatar
1 vote
3 answers
1k views

Create a pager between fields

I have a content type that has no limit on how many body fields it can have. You can say that each body field represents a page in a book. You are supposed to switch page to see the next body field. ...
Frinsh's user avatar
  • 71
0 votes
2 answers
946 views

Change pager text

I need to change the text that appears in pagers (first/previous/next/last). I would really prefer to not get into the overhead (and sloppiness IMO) of a string override module. Pager.inc seems ...
ack's user avatar
  • 2,149
0 votes
1 answer
653 views

How would I paginate to 5 results in each page this query?

I am trying to paginate the results from the table, I saw some examples but those make use of db_select, I chose db_query. Is there a way to get the paging with db_query? I have been trying to ...
M1ndr1ft's user avatar