Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Relative page index

Solved by pamtbaau View solution

Started by AquaL1te 3 years ago · 2 replies · 487 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 Vladimir Novak, 2 weeks ago
3 291 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago