Displaying categories of events
I'd like to make a page that lists the category group of my events channel, linking to the categories that have upcoming events, and only outputting the names of categories without any entries. I'm trying this:
{exp:channel:categories channel="events"}
{exp:low_events:entries channel="events" category="{category_id}" show_passed="no" limit="1"}
{if no_results}
{category_name}
{/if}
{category_name}
{/exp:low_events:entries}
{/exp:channel:categories}
But I think the {if no_results} is getting confused because of the outer loop. Any ideas on how to do this, or a better way to do this?
Replies
Low 11 Jun 2013 19:00
Nesting those tags is a bad idea.
Take a look at this article: http://loweblog.com/freelance/article...
You can use the same approach, switching the channel:entries tag with the low_events:entries tag.
Alternatively, you could probably use something like Stash for that kind of output.
Jimmy Hansen 11 Jun 2013 19:41
Great article and interesting PHP--just discovered heredoc. Thanks very much.