Questions tagged [pagination]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Paginate and Cache Together and SEOmatic helpers

I am struggling to get this working correctly. If I keep the element queries outside the cache tag then this naturally stops the cache being broken and so is not a viable option. However, when I put ...
0
votes
0answers
19 views

Pagination - setting the default first page without url as /page/1

Pagination issue. What is the best method to resolve this? So on a site I have a news section. All links point to this page as /news/ so e.g. (http://www.website.co.uk/news) I am then paginating this ...
1
vote
1answer
18 views

Where can I set how the pagination links render?

I have inherited a Craft 3 project in which the pagination links render with a query parameter "page": https://mysite.com/blog/?page=2 but this makes crawlers like HREFS to ignore the Next ...
0
votes
0answers
27 views

Link to the next Entry Type in a Structure level [duplicate]

I have a Structure with three Entry Types: entypeOne entypeTwo entypeThree When a user is viewing entries saved as entypeThree I want to add 'Next' and 'Previous' links which only link to the next/...
1
vote
1answer
83 views

Graphql total results / pageinfo when searching with pagination

I'm trying to build something to search my data that is stored in Craft with graphql. To make pagination work I want to know how many results there are in total. I'm doing a query like this: query($...
1
vote
1answer
28 views

Looping through element queries directly has been deprecated

on the template _events.twig {% include "./components/_listing" with { entries: craft.entries.section('events').orderBy('eventStartDate ASC').limit(3), columns: 3, heading: 'On this month', ...
1
vote
1answer
23 views

Struggling to get Entry index number so I can output “X of Total Entries”

I have a channel which has multiple entries in, I'm trying to output the current entry number, for example "1 out of 20 posts" Currently this is what I am working with: {% set total = craft.entries()...
2
votes
2answers
59 views

Merge, shuffle, and paginate 😱

I'm trying to get a list of users from two different user groups. One user group (premium) must always show first. Whenever the page is loaded, however, the listing of users should show randomly (...
1
vote
1answer
45 views

Paginate entries grouped by day

Been at this a couple of hours and my head is scrambled. Wonder if anyone has already solved it and cares to share? I'm trying to paginate a list of entries grouped by day - showing 3 days worth of ...
0
votes
0answers
23 views

get pageTrigger in URL before pagination starts

When using pagination in TWIG / Craft, URLs will automatically add the pageTrigger to overview URLs. e.g. | <--- Entry URL ---> | <- pageTrigger -> | https://mydomain.com/news/...
0
votes
0answers
10 views

Category filter with localization?

I'm using craft 2 and have a list of category which are: category A. category B. An entry which have different assigned categories in 2 locales. An example entry belongs on category B in English ...
1
vote
2answers
41 views

Sort entries by a related entry (lastName) and then paginate

I have two channels books and authors I need to list all books sorted alphabetically by author. I have this working with the following code: <ul> {# // loop through authors so we can ...
1
vote
1answer
92 views

Pagination and “if” condition

Some of my entries have the same entry.title. At the frontend, I would like to display these entries only once. This works with the following code: {% set entries = craft.entries().section('produkte')...
1
vote
1answer
95 views

Pagination Slug Issue

I've setup a 'posts' section with a collection of posts. I'm trying to add pagination to the individual post entry. I've copied the pagination code from the Craft CMS documentation but I'm having ...
2
votes
1answer
13 views

Paginate events without setting expiry date

Is there a way to paginate events entries without setting an expiry date for each entry? So I currently have: {% paginate craft.entries.section('eventsEntry').limit(3).orderBy('eventDate') as ...
1
vote
2answers
120 views

Paginating Merged Element Queries

I really want something like this to work but the merge function turns Elements into Arrays. I've managed to work around it other times but what's the best practice to combine two entry sets and then ...
2
votes
1answer
22 views

Paginate entries ordered by a custom date field

I'm trying to paginate a bunch of events based on their start date. The order part is working correctly, but each consecutive page just loads the exact same entries. My code: {% set events = craft....
1
vote
1answer
353 views

Order entries by a category field alphabetically then paginate

I've tried so many different things and can't get this to work... {% set makeCat = craft.categories() .group('make') .orderBy('title') .limit(21) %} {% paginate makeCat as pageInfo, ...
1
vote
1answer
14 views

Pagination with users

How do I get pagination set up with the following? It should be easy but I'm getting in a muddle. {% set myUserQuery = craft.users().group('members').order('companyName asc').limit(10).find %} {% set ...
1
vote
2answers
431 views

Search products and entries with pagination

Is there any way of searching both entries and products at the same time? Wanting a single search on the site which will return all entries and products containing the searched for phrase. Looked at ...
2
votes
1answer
78 views

Manually passing page number to paginate tag

{% paginate %} tag takes current subpapage number from url address. Can this behaviour be bypassed and page number be passed directly into {% paginate %} tag?
1
vote
1answer
37 views

Pagination with if statement date modify

How can I incorporate the date_modify into the craft.entries query so that the pagination takes into account this criteria? At the moment the limit is also accounting for past entries and I'm hitting ...
1
vote
1answer
57 views

Pagination: Next/Previous related to author

I'm having trouble limiting next/previous links in one channel to articles by the author. next/previous links are working correctly on the regular blog but when included on the DJ blog I get unknown ...
1
vote
1answer
46 views

Pagination and Entry Model on Homepage

On my site I have some entries with images. In the entry template I paginate the images like so: {% paginate entry.images.limit(1) as images %} My homepage is a single random entry and I want to ...
1
vote
0answers
25 views

Paginate entries based on related status

So, let's assume I have two channels. events and movies, being events the screening time of each movie. In the admin, in the event entry, you can select one movie. The movie could be disabled. The ...
2
votes
1answer
364 views

{% paginate %} Tag issue, no prevUrl / nextUrl Data

I have problem with the {% paginate%} tag. Setting: Craft CMS 3.0.18 Channel with 3 Entries -> handle "newsBlog" {% paginate craft.entries.section('newsBlog') as pageInfo, pageEntries %} When i ...
2
votes
1answer
210 views

Cache not invalidating when using pagination with cache

Any idea why this code wouldn’t update/break the cache when new items are created? Think perhaps the combination of my code for pagination, cache and the ability to also break for pending entries isn'...
1
vote
1answer
639 views

When to hide show more button

I am use a load more button in place of pagination. I just using jquery and ajax using this post as a starting point. The problem I'm having is how to hide the button when there is no more posts to ...
0
votes
1answer
345 views

Cache and Pagination not working

I'm trying to get pagination and cache to work together but it's failing. Here's my current code: {% cache globally using key craft.request.path ~ '/p' ~ craft.request.getPageNum for 2 hours %}...
1
vote
1answer
29 views

Allowing the user to update a CraftCMS pagination limit with listing filter options

I am building a pagination layout limiting the content to 10 because, well, it makes sense to break down large amounts of content to smaller chunks. But as there is so much, a user might want to ...
0
votes
1answer
348 views

Ajax pagination not loading last entries if not equal to pagination number

I've got ajax working on a page but if the number of articles is not exactly 3 (this is the pagination limit) then the remaining 1 or 2 entries do not get loaded. I'm not sure why or how to resolve ...
1
vote
0answers
113 views

Paginate Results from Restful XML Feed

I'm beginning with Craft/Twig and am developing a plugin that gets data from a Restful XML feed, and I've successfully tested it on my template. Below, I have the working plugin code and a sample of ...
3
votes
3answers
519 views

Pagination with randomly ordered entries

I have a need to list a set of entries 9 at a time but with a random order. The pagination happens via Ajax, with each next set of 9 entries loaded onto the page when the user clicks the "See more" ...
3
votes
2answers
2k views

Using pagination on a page with url with query string data

I have an index page that filters entries based on url query strings, eg: site.com/inductees?county=123. I put together a very simple pagination setup with next/prev links. However, when I click "...
0
votes
0answers
186 views

Pagination query

Pagination query/issue. The client/design for a site am building requires the first page to show fewer entries than subsequent pages so been guessing have to write some own/custom pagination jiggery ...
3
votes
1answer
652 views

Getting the last X number of pages in pagination

I am working on a pagination for some articles. I am using a for loop to get the 3 pages after and before the current page .getPrevUrls(3) and .getNextUrls(3) So far it looks like this, where 35 is ...
2
votes
1answer
188 views

Displaying entries with pagination on a category page where the entry's last category in the array is the current category

I want to only display entries on the category page which is the last in the array of the entries category, so that it doesn't also show on parent category page. Let say these are my categories: ...
1
vote
1answer
345 views

Order a paginated entry by postDate

I'm stumped trying to order paginated entries for a channel. The end goal is to have listings with the most recent postDate at the top. The code below has the most recent item third instead of first. ...
1
vote
2answers
497 views

provide a 'back' or 'cancel' or 'close' button to return to whatever page that particular template was accessed from

I have two templates. For the purpose of this question lets say the first template is step 1, and the second is step 2. There are links to launch these templates all over the site, but some times an ...
0
votes
1answer
210 views

Add page number to Title and meta desc

Want to add page number to title and meta description because I have a lot of duplicates. Could you tell me how I can do it?
1
vote
1answer
116 views

Create a specific order of paginated entries by entry type

I am working with a design that requires entries to be laid out on a listing page in a specific order based on whether they are "Standard" or "Premium". The order of the paginated listing page is as ...
2
votes
1answer
227 views

How to use `{% cache %}` and `{% paginate %}` together?

When using cache tag with pagination should the tag go outside the pagination tag? {% cache %} <div class="grid-x grid-padding-x" data-equalizer data-equalize-on="medium"> {% paginate craft....
1
vote
0answers
590 views

Custom Routes with URL Parameters and Pagination

I am migrating an old EE site to Craft. The EE site has a filter feature for certain weblogs. It outputs a list of entries for a weblog filtering on year, program, etc... which are passed as URL ...
2
votes
1answer
303 views

Check paginated currentPage before setting the paginate tag

This might sound counter-intuitive, but I'm trying to set a specific limit; if the currentPage is the first paginated entry. {% set limit = paginate.currentPage == 1 ? 5 : 8 %} {% paginate craft....
2
votes
1answer
387 views

Check which pagination page to display code outside of pagination loop

I have some Featured news entries which appear at the top of the rest of the news entries. How do I set this so they are only on page 1 (before any pagination pages)? {# Only show on page 1 of ...
1
vote
0answers
310 views

How to add pagination to a filtered category output?

I've been able to successfully filter a set of entries by category, and also include pagination for the complete set of entries (in this case so 6 are displayed per page). But once a category filter ...
1
vote
1answer
2k views

Using pagination with Ajax load.. help need on JS

I am using a template which has a 'LOAD MORE' button beneath a grid of entries (entries 1-10). Click this link loads addition content to the grid via AJAX from another page (which contains entries 11-...
1
vote
1answer
105 views

Pagination, display 'Next 20 Results' etc

Just a quicky regarding pagination. I have a paginated results list with a limit of 20 results in a page. I'm wondering how I owuld go about making a pagination that shows the number of results on ...
1
vote
1answer
91 views

Display only entries relevant to users' country

I'm really struggling with displaying news entry that are only relevant to the users' location. Here is my structure: User Country - > is a dropdown with a single value (lets say UK) Regions is a ...
0
votes
1answer
193 views

Paginate children in a structure

Or to say it in a different way, paginate siblings. I found this question on stack: How do you page through child entries in a structure? which seems to have a working answer. However trying this ...