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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Relative page index

Solved by pamtbaau View solution

Started by AquaL1te 3 years ago · 2 replies · 343 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 Rene, 1 week ago
2 49 1 week ago
Plugins · by Xavier, 4 weeks ago
2 57 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1184 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 50 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 75 2 months ago