Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Relative page index

Solved by pamtbaau View solution

Started by AquaL1te 3 years ago · 2 replies · 677 views
3 years ago

The pagination plugin allows me to show just 5 blog items per page. But now I've reached the point of having 10 pages in the index at the bottom of my blog overview.

https://www.zeitgeistbeweging.nl/nl/blog

I had to set the blog items per page to 8, so that I would stay below 10 page indexes. Because when listing < 1 .. 10 > at the bottom of the page, the mobile view becomes affected and doesn't scale well anymore.

Is there a way to force a max of 8 indexes at the bottom? And then when having 10 indexes in total, it just becomes a relative index of e.g. < 3 .. 8 >. I hope this makes sense. For now I haven't figured out how I can create a relative page index at the bottom.

3 years ago Solution

@AquaL1te, Also, have you tried the README of the Pagination plugin? Especially the Config Defaults section about 'delta'?

The 'delta' value controls how many pages left and right of the current page are visible. If set to 0 all pages will be shown.

Using delta: 2 will yield:
image|422x73

👍 1
last edited 08/14/23 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Plugins · by DrPen, 1 month ago
2 478 1 month ago
Plugins · by renedebaaij, 2 months ago
1 350 1 month ago
Plugins · by Thomas, 1 month ago
1 375 1 month ago
Plugins · by complanar, 2 months ago
6 699 2 months ago
Plugins · by BenLaKnet, 2 months ago
1 642 2 months ago