Questions tagged [pagination]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
17 votes
3 answers
7k views

How do i setup ajax paging for entries

Im looking for a good way to setup paging for new items with a simple "load more" button at the bottom. I know i'd use something like {% if craft.request.isAjax %} on the listing template to not ...
Keith Mancuso's user avatar
39 votes
3 answers
11k views

How to link to previous/next entries in a section?

What would be the equivalent in Craft of ExpressionEngine's Next/Previous entry linking? I was looking at getNext() and getPrev() (and their aliases next and prev) (via the EntryModel docs), but when ...
Derek Hogue's user avatar
4 votes
1 answer
1k views

Paginate Entries by Day

This is giving me a surprisingly hard time. Has anyone tried to paginate entries by date, in this case, specifically by day; i.e.: First page loads today's posts, next page loads yesterday's, then the ...
cballenar's user avatar
  • 1,409
2 votes
1 answer
793 views

Paginate entries when I do not have a criteria model?

I have to... merge results from multiple different criteria models use Supersort to order my entries in the desired sort order [...] ...and need to paginate them for my index page. As the paginate ...
carlcs's user avatar
  • 36.2k
14 votes
2 answers
4k views

How to paginate search results?

What’s the best way to paginate search results? I was using {% set query = craft.request.getParam('q') %} and then {% paginate craft.entries.search(query).section('…').limit(…).order('…') as ...
James's user avatar
  • 1,138
4 votes
1 answer
696 views

Modify ElementCriteria and use it for paginate

First some context. I'm using Smart Map for Craft to display some location based events in a listing. My structure is as follows: Events channel Locations channel Each event can occur multiple times,...
ctigelaar's user avatar
  • 137
4 votes
1 answer
954 views

Search across Entries and Assets and paginate combined results

I need to search both entries and assets and paginate the combined result. I have tried: {% set entries = craft.entries.search(query|trim).order('score').status('pending, live').find() %} {% set ...
Edin's user avatar
  • 43
3 votes
2 answers
797 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 ...
Matthew Rotter's user avatar
3 votes
1 answer
1k views

Limit entry pagination to 6 pages?

I've been given a site and asked to prevent visitors from seeing the news archive beyond page 6. The navigation has already been done, but if the user manually enters example.com/news/p7 they'll see ...
jezmck's user avatar
  • 143
2 votes
2 answers
2k views

Paginate An Array Of Entries

I have read through the docs and I am not sure if what I need to do is possible with array sets. I have filtered my entries using the following code" {% set allDatabytes = craft.entries.section('...
Gareth's user avatar
  • 1,605
2 votes
1 answer
856 views

Eager-load and pagination

I'm currently working on a relation-heavy website with a colleague of mine and, for that reason, eager-loading stuff looks very appealing to us. We've succeeded in eager-loading pretty much everything ...
Pierre Stoffe's user avatar
2 votes
1 answer
912 views

Search Results Pagination with multiple form fields

I have a search form containing 1 text field and 2 checkbox groups. Text field is called: keywords and the checkbox groups are called: services[] and locations[]. The search works fine if I don't ...
Sean Delaney's user avatar
2 votes
1 answer
992 views

Sensible way to have different number of entries on page one of pagination?

I have a blog where page one has a big "feature" thumbnail and after that each subsequent thumbnail is half the size. I want that to only happen on page one, which i have done using: {% if paginate....
Dan Owen's user avatar
  • 496
2 votes
2 answers
2k views

Exclude category from channel entries (with pagination)

I'm trying to paginate a channel of entries but I also need to exclude any entries that relate to a specific category. This is what I have so far... {% set insightCategory = craft.categories({"slug":...
michael's user avatar
  • 228
1 vote
1 answer
360 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', ...
Sameera Thilakasiri's user avatar
1 vote
1 answer
200 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 ...
Ian Ebden's user avatar
  • 894
1 vote
1 answer
792 views

Paginate based on date-based starting points

I'm working on creating a simple calendar based on only native Craft fields. While coding this, I'm having a hard time getting the pagination to work properly. The calendar currently lists all ...
Filadelfia's user avatar
1 vote
1 answer
209 views

Paginate by Group

I am trying to group entries based on week and then paginate them the same way. I'm not quite sure how to go about setting each page to be a separate week/group though. Thoughts?
Christopher Healey's user avatar
0 votes
1 answer
117 views

Paginate based on items in a Category

I'm trying to wrap my head around Pagination in Craft. I have a template that outputs a list of products based on the Category that is passed to it from this thread: {# Fetch the entries related to ...
doctorgloom's user avatar