Low events and related_categories_mode
I'm using this code to try to get Low Events to display entries related to a particular category:
{exp:low_events:entries channel="calendar" unit="upcoming" limit="3" disable="member_data|pagination" related_categories_mode="yes"}
{title} - {event_dates:start_date format="%j %M %Y"}
{if no_results}There are no forthcoming events at present{/if}
{/exp:low_events:entries}
The title of the event entry displays correctly, but the date doesn't render: it just appears as {event_dates:start_date format="%j %M %Y"}.
I've searched the forums and read the documentation but I haven't been able to find whether Low Events supports the functionality I'm trying to implement. Thanks - any advice greatly appreciated.
Replies
Low 14 Dec 2012 09:56
Hi Justin,
What's the short_name of your Low Events custom field?
Justin Reynolds 14 Dec 2012 10:02
Hi Low - thanks for your quick response.
The short_name is event_dates. This code is working on another template on my site without problems:
{exp:low_events:entries channel="calendar" unit="upcoming" limit="3" disable="member_data|pagination" dynamic="no"}
{title} - {event_dates:start_date format="%j %M %Y"}
{/exp:low_events:entries}
That template just requires a list of all forthcoming events, hence the dynamic=no. So I'm wondering if the issue is to do with related categories. Thanks.
Low 14 Dec 2012 10:21
Looking at the docs, I think you need to add custom_fields="yes" to the tag as well.
Justin Reynolds 14 Dec 2012 10:40
Aha, brilliant - that did the trick. Will bear that in mind for the future. Many thanks!