picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.83k stars 617 forks source link

Issue with Pagination plugin #419

Closed ACast59 closed 6 years ago

ACast59 commented 6 years ago

Normally i would open an issue in rewdy/Pico-Pagination but since the developer hasn't been active for about a year, may as well open it here.

My issue is that i can only use the plugin to create a pagination in a single "sub" but if i want to use it in two separate "subs" like blog and blog2 it suddenly breaks. Is the plugin not designed to handle something like this?, i'm very new to picocms and considering using it on a site i'm going to create but first i have to make sure things work the way i want them to.

Thanks.

PhrozenByte commented 6 years ago

You should try to contact the plugin developer, just because he didn't change anything for a year doesn't mean that he's no longer supporting his plugin. AFAIK this isn't possible with rewdy/Pico-Pagination, but the plugin developer might add this feature. It doesn't hurt to ask 😉

Anyway, starting with Pico 2.0 (you can safely use it in production, the only reason this isn't final yet are missing docs, see v2.0.0-beta.2 and #401) you don't really need a plugin for that. You can use the page tree together with the possibility to access HTTP GET/POST variables to implement pagination with pure Twig. See #412 for some info about the page tree, and PhrozenByte/pico-http-params for info about accessing HTTP GET/POST variables (you won't need this plugin, it's already in Pico's core starting with version 2.0, but the API is exactly the same).

Unfortunately I can't provide you with a copy-and-paste snippet, you'll have to figure this out on your own, I just can tell you that it is possible. If you made this working I'd love to add the snippets to our cookbook, allowing others to learn from your work.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1: