We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

entries_listing returns dummy value when no entry matches

Vlad Dumitrescu October 19, 2014 by Vlad Dumitrescu

I am using

{{ entries:listing folder="/info" sort_dir="asc" show_future="yes" show_past="no" }}

to show only the upcoming events in a list. The thing is that when there are no future events, there is still an item generated, with the fields being the page's.

I tried to put an if around the listing, but couldn't write a condition that tells if there are any results after the filter is applied.

How can I output "No events planned" when there are none in the future?

This is with 1.9, haven't tested with older versions.

Answered by Vlad Dumitrescu!
>>>>>>> Answered <<<<<<<
1 Reply
1 Follower