Page 1 of 1
CGCalendar: possible to display all events?
Posted: Thu Mar 19, 2015 2:18 am
by Cerulean
Looking at the parameters for CGCalendar, I can't see a way to display a list of all events. There are options for listing past events, upcoming events, or events for a given year, but no option to simply display all events.
Any suggestions?
Re: CGCalendar: possible to display all events?
Posted: Mon Mar 23, 2015 6:29 pm
by paulbaker
Cerulean wrote:Any suggestions?
2 calls on one page? Past events, and then upcoming events.
Re: CGCalendar: possible to display all events?
Posted: Tue Mar 24, 2015 12:36 am
by Cerulean
Thanks for the reply.
paulbaker wrote:2 calls on one page?
Yes, I think that will be the only way.
Thinking that it would be good to merge the event arrays from the two module calls so a single foreach loop can be used, I came up with the following...
In the CGCalendar template for the first module call (pastlist):
In the CGCalendar template for the second module call (upcominglist):
Code: Select all
{foreach $merged_events|@array_merge:$events as $key=>$event}
...
{/foreach}
There might be better ways to do this, but this method worked okay for me.