Questions tagged [paging]
The process of splitting the result of a query on different pages is called, in Drupal terminology, paging.
38
questions
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 ...
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 ...
4
votes
4
answers
18k
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->...
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?
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 ...
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"><...
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 ...
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 ...
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 ...
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.
...
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 ...
1
vote
1
answer
356
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 ...
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(...
6
votes
1
answer
6k
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 ...
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 ...
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')
->...
4
votes
1
answer
2k
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 ...
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
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
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 ...
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....
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 ...
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 ...
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 ...
2
votes
1
answer
974
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 $...
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 ...
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 ...
1
vote
2
answers
600
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, ...
1
vote
1
answer
968
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 ...
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 ...
1
vote
3
answers
728
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 ...
1
vote
2
answers
912
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: ...
1
vote
2
answers
573
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 ...
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 ...
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.
...
1
vote
0
answers
886
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 ...
0
votes
1
answer
648
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 ...
0
votes
2
answers
932
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 ...