Questions tagged [pagination]

124 questions
5
votes
4 answers

Back to paginated page

While I know the back button does this perfectly well, I was wondering if there was a good way to "return to" a paginated page using a previous request or something? Wanting to do this server-side rather than relying on JS. Thanks.
Ryan Shrum
  • 1,914
  • 14
  • 22
4
votes
1 answer

Paginate Entries With The Same Tag

On a single entries page I have the following code:
{% set params = {section: 'databytes', order: 'title'} %} {% set prevDatabyte = entry.getPrev(params) %} {% set nextDatabyte = entry.getNext(params)…
Gareth
  • 1,605
  • 2
  • 14
  • 35
3
votes
2 answers

relate pagination to entry on page

I have managed to sort most Craft CMS questions out by reading the docs and feedback on StackExchange but am having issues with this one. I have a page with a list of entries down the right side and the main entry content to the left. The list is…
3
votes
3 answers

Any examples of numeric pagination?

I can find examples of prev/next style pagination but none of creating proper numeric-style pagination (eg. how Google do it). Does anyone have an example I could use?
hamishtaplin
  • 776
  • 8
  • 16
3
votes
2 answers

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?
Piotr Pogorzelski
  • 1,286
  • 7
  • 18
3
votes
1 answer

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.entries.section('news').limit(limit) as articles…
Mark Notton
  • 2,337
  • 1
  • 15
  • 30
3
votes
1 answer

Including Zii in Craft CMS

I have a large dataset of active records (not Craft entries) that I'd like to display in the admin frontend. Yii comes with a widget called CGridView, found here: framework/zii/widgets/grid/CGridView.php, which would fit the bill perfectly. I've…
Mik C
  • 33
  • 4
3
votes
1 answer

Using prevSiblingOf and nextSiblingOf

Super simple problem. I'm on a news item page (not a paginated overview page) and want to show a link to the next news item in the Channel; So I can't understand why this is outputting nothing at all: {{…
Matt Wilcox
  • 3,199
  • 1
  • 14
  • 28
2
votes
2 answers

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('databytes').limit(null) %} {% set seriesCollection =…
Gareth
  • 1,605
  • 2
  • 14
  • 35
2
votes
1 answer

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.currentPage == 1 and loop.index == 1 %} That works…
Dan Owen
  • 496
  • 2
  • 12
2
votes
1 answer

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 try to pagination the results. When I try to paginate…
Sean Delaney
  • 720
  • 6
  • 15
2
votes
1 answer

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 pageInfo, upcomingEvents %} {% for event in…
Andrew
  • 738
  • 1
  • 5
  • 11
2
votes
1 answer

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 pagination #} {% for entry in…
sarah3585
  • 899
  • 7
  • 14
2
votes
1 answer

pagination showing all entries

I have the following code for my news page. The links show up but I'm seeing all the entries on every page. I'm not sure if this is related to my featured entry at the top. {% extends "_layout" %} {% set title = "News" %} {% paginate…
2
votes
1 answer

Paginate entries with offset / limit when templating

I've got the pagination function working nicely for a simple for loop of news entries. However I want to split the template up into the first 2 entries as featured items then the next 6 as smaller items. As I paginate through the entries I'd like to…
Adam Menczykowski
  • 1,390
  • 11
  • 22
1
2