statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

FR: Ability to paginate entries grouped by date #793

Open ldstevens opened 8 years ago

ldstevens commented 8 years ago

Error message: "Paginating entries grouped by date isn't currently supported. Let us know that you want it."

Yes please :)

Context: I'm working on a blog with multiple entries per day. I want to display a date heading per day, e.g.:

1 July 2016

...and I'd like to paginate this. (I'm working on the assumption that {{ date_groups }} is the only way to achieve something similar to EE's {date_heading} feature.)

Thanks :)

jasonvarga commented 8 years ago

Let's say you used limit="5", and one date group would be broken across pages. What should happen? Can you give an example of how EE handles it?

Should it repeat the date heading on the next page? Splitting across two pages seems like it could be confusing.

Should it try to fit all the entries under the date heading? That would go against the limit parameter you've set.

ldstevens commented 8 years ago

I had a look, and EE always repeats the date heading on the next page. Therefore if you have site.com/blog/P20, or P100, or whatever, there's always a date heading at the top of the page.

I think that's the best way - it makes display consistent, and keeps the limit you set.

Edit: Also, if you arrive on page two (for e.g.), with the date header repeated you know when the entries you're looking at are from. This is handy as the entry summaries may not have date stamps themselves if you're relying on date headers.

jasonvarga commented 8 years ago

My only issue with that is that if you arrive on the second page of a date group and there's a heading, you might think thats where the group starts, and no previous entries.

ldstevens commented 8 years ago

True, but I guess the reason date headers are used (at least for me) is so you don't have to have a date attached to every entry in a listing. If you don't have date headers on second pages, you end up with undated entries, which means you'd need to add dates to those entries, which defeats the purpose of having date headers. So I think that kind of necessitates date headers on secondary pages. What do you think?

(Plus, clear pagination navigation, or "return to home"/breadcrumbs can help alleviate the issue from a design POV.)

It's a tradeoff either way, but I think the EE approach is the stronger one for the date header vs date stamp case.

MarySenge commented 8 years ago

I'd really like this, too. I got the same error message as ldstevens. Struggling to find a workaround for now. I have a collection with an unknown number of entries each day, but not necessarily entries on every day. I need to be able to display the entries grouped by date, but each on a separate page.

aryehraber commented 7 years ago

I’ve just run into this too; hope this is still on the radar!

For the “repeat the date heading on the next page” question: I’d quite like to see an additional variable inside the {{ date_groups }} loop (eg. continued: true or split: true) added if the month was ‘cut-off’ on the previous page.

Eg: On the 2nd page I could add a heading like “February 2017 (continued)”

alehandrof commented 6 years ago

I ran across this as issue as well. I have 70+ entries that I'd like to show 10 at a time.

This was possible in v1: https://www.amicalnet.org/events?past=1

The splitting issue that Jason mentions is not a big deal to me. You can see how February 2018 breaks across two pages in the link above.

ryandc commented 4 years ago

Is this a potential feature for V3.0, or low priority?

I'm having the same issue where I have to choose between a paginated blog (using infinite scroll/load more) and splitting the blog posts visually by month with the drawback of displaying all the posts (which isn't a long term solution)