I’m trying to do something similar, and query for events which are in the future (so, not displaying events which are in the past).
I was going to try the approach of using a paginator, and have an if statement within the range, but this wouldn’t work, as it would potentially show blanks in certain pages and create an inconsistent experience. Consider that you have 2 events, one in the past, and one in the future. For arguments sake, you have display 1 result per page. You would then have 1 blank page, and 1 populated page…
Is something similar possible? I’ve been looking through the docs, and the community posts, but can’t seem to piece together a scenario that would fit.
No problem! And thanks for getting back to me For completeness for anyone reading back, I’m trying to make a view, where I have a list of events that are in the future. I’ll then have a separate page for past events.
The magic piece of the puzzle is the (now.Format …) piece that you have included. Previously I was trying all sorts of combinations, e.g. just using now directly, using now.Unix, etc.
Thanks again for this, I went over so many combinations I think I was starting to get myself a little confused