Replies: 1 comment
-
You could try to use conditions on the actual collections tag: https://statamic.dev/conditions#string-conditions, which then means you have limited the results so no_results should be valid.
It won't handle your is_today condition, but it gets you most of the way there which is maybe enough of a compromise? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a collection of tour dates, each of which consist of a date and a description. I want to show a list of tours, but not tours in the past. I use this code for that, and it works great!
If there are no tour dates to show (because all entries in the collections have dates in the past, how do I show a message instead of nothing? I read something about no_results, but I can't seem to figure out how to code this.
I tried something like:
That doesn't show the message, but I'm guessing that's because 'no_results' is for the collection as a whole, not just tour dates in the future, so even if all entries have tour dates in the past, the 'no_results' condition is never met as there are results (i.e., entries in the 'tours' collection, just not the ones I want to show). I'm blanking out here now.
Does anyone have any suggestions?
Thanks so much!
--Ron
Beta Was this translation helpful? Give feedback.
All reactions