Questions tagged [paging]
The process of splitting the result of a query on different pages is called, in Drupal terminology, paging.
394
questions
12
votes
3
answers
9k
views
Views Page not showing pager
I've got a Views Page showing Article teasers. There are lots of Articles in the db and I'm only showing 5 per page in the View, but the Pager is not showing up at all. Here is my Views configuration, ...
8
votes
3
answers
15k
views
Views, Views-Slideshow, and Paging in Drupal 7
The situation is as follows: I have a content type Slide, and I want to display the three newest slides in a slideshow. The slides need to cycle, and the slides also need to be controllable by a ...
8
votes
1
answer
223
views
Does DRUPAL_CACHE_PER_PAGE count pager pages (i.e. frontpage?page=3)?
I guess my whole question is pretty much in the title... I'm wondering if blocks that use DRUPAL_CACHE_PER_PAGE get cached on pager pages (i.e. mysite.com/frontpage?page=3), or if the pager query is ...
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 ...
7
votes
1
answer
4k
views
Show the pager on the top and in the bottom of the page (generated by Views)
I created a view and set a pager for it.
I is shown in the bottom of the page. Is there any way to show it both in the bottom and in the top of the page?
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 ...
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"><...
7
votes
3
answers
2k
views
How should I deal with Views URL parameter "page" in Google web master tool?
I have node view which has pager with URL parameter "page". I want Google bot crawls all the pages ( page=1 page=2 page=3... ) but regard all of them as just one and only the first page (without ...
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 ...
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 ...
6
votes
5
answers
8k
views
Help with Pager
I am using the Drupal 7 and i want to use the Pager into my query
This is my query and the way i can use
$qury = db_select("SELECT `entity_id` , `field_keywords_value` , COUNT( DISTINCT ( `entity_id`...
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-...
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
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
1k
views
Is there a way to set the pager's page number programmatically without the page being in the url?
I would like a user who has previously left a comment on a node to initially see the last page of comments while a new user (to that node) will initially see the first page of comments.
I know that ...
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 ...
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?
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 ...
5
votes
1
answer
3k
views
How to programmatically render a view pager?
I'm trying to figure out how to render a view's pager programmatically. I'm renderering my view programmatically as follows:
$viewname = 'example_view';
$viewdisplay = 'block';
// get the view ...
5
votes
3
answers
3k
views
Can we get full count of results from a query that is extended by PagerDefault
I have a query that is extended by PagerDefault. I need to get the total count of results to show something like: "There are a total of 100 results, now showing 21-40". I can't figure out where to ...
5
votes
1
answer
1k
views
Using Infinite Scroll module with Views paging: Detrimental to Google SEO?
I love using the Infinite Scroll module with Views. But does Google limit indexing to to only those first bunch of nodes which appear in the view?
I'm guessing that when using a regular pager, ...
5
votes
1
answer
2k
views
View with paged output - how to alter number of pages?
I use Views 7.x-3.8.
I have view "taxonomy_term". It has Paged output, full pager. Number of pages (the total number of pages) is set to 100, Items per page = 10.
Now I want to show all pages for ...
5
votes
1
answer
2k
views
How to offset an EntityFieldQuery when using pager?
Is there some way to easily offset an EntityFieldQuery when using pager(), i.e. skip the first 3 nodes? range(3, NULL) doesn't work as the second value must be set, and range() also doesn't work when ...
5
votes
4
answers
2k
views
pager_query() - How to fetch only 100 records with a pagination 10 items per page?
$result = pager_query($query, 10, 0, NULL, $args);
Currently with above code , I am getting all results with 10 items per page. But I need to display only first 100 records , with 10 items per page. ...
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->...
4
votes
2
answers
2k
views
Is there a way to expose the pager fields?
I'd like to let the user pick how many items are gonna be displayed on the page. Therefore, I need to display a field with a select or something.
Is there a way to make that directly through the UI, ...
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
3k
views
Move views pager to top of node instead of bottom
Is there a simple way to move views' pager to a different place than the default bottom?
4
votes
2
answers
2k
views
How do I add the page number to the page title on drupal default paginated pages?
It has been recommended by an SEO consultant that for paginated pages the page number is included in the page title to avoid duplicated content. How do I achieve this?
I did this:
function ...
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
2
answers
2k
views
How to place the pager for a view in page.tpl.php?
I have a view on my front page showing the latest posts, but the design of the website implicates the pager to be located outside the content area of the view (way across in the sidebar). Is there a ...
4
votes
3
answers
3k
views
Preserve views exposed filter options when back button is pressed
I have an ajax exposed filter in the views. When user select option from filter it loads content. But when I click on item on view and press browser back button, exposed filter resets and default ...
4
votes
2
answers
104
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....
4
votes
1
answer
582
views
Drupal pager, go to specific page
I have a form in pager, so user can enter page he want's to view. But I can't figure out how to go to that page number in form submit.
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()-&...
4
votes
1
answer
1k
views
Views with attachment - How do I exclude pagination offset on every page but the first?
I have a view with an attached view to display the first row with different fields and markup. This works perfectly except for when you start using the pagination.
When I press another page (in the ...
4
votes
1
answer
1k
views
How to noindex on paginated pages in Drupal 7?
This question is almost a copy of: How to noindex comment/reply in Drupal 7
However in this case i would like to know how to add noindex,follow on paginated pages. For example I want to add noindex,...
4
votes
2
answers
199
views
Create a pager with "Yesterday", "Monday", "Sunday" etc
I have a view which through contextual filters show content created on the current day, and I would like to add a pager to allow users to go back in time one day at a time.
Say we visit the site on a ...
4
votes
1
answer
1k
views
Alter pagination start index
Is it possible to make the pagination system numbering correspond to the page number you are on?
For example, instead of having /media-releases (page 1), /media-releases?page=0 (page 1), and /media-...
4
votes
1
answer
701
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 ...
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
3
answers
926
views
Is there a module or easy way to break up nodes into multiple pages?
Is there a module or easy way to break up nodes (ie blog posts) into multiple pages?
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 ...
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
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 ...
3
votes
3
answers
913
views
Display all comments of node without pager (300+ comments)
I have a content type with threading comments. The max number of comments per page is set to 300 (that is the absolute max). If there is more than 300 comments - they get paged.
How do I show all ...
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
889
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('...
3
votes
4
answers
4k
views
Create "show all" link in Views pager
I have created a view that displays titles of contents created by authenticated users. I have used pagination to display specified number of items per page. Besides this I want a "show all" link that ...
3
votes
3
answers
1k
views
Can a pager item point to an anchor on the page?
I'm building a page where, somewhere down in the middle of it, there's a pager of some stuff. The pager is working fine, but, when you click on one of the pager items, the page is redrawn showing the ...