I still have an issue with the day parameter, I'm using this code in the page to display the event of the day (it's the daily menu for a restaurant) {cms_module module='CGCalendar' display='event' eventtemplate='home' day='d'|date}
when updating the events for the coming week, it displays not the current day, but a random day. This week it doesn't want to display anything else than friday. It looks like a bug maybe ?
CGCalendar display single day - today!
Re: CGCalendar display single day - today!
ok I found the solution: it's working much better with display='list' and a good template.
Re: CGCalendar display single day - today!
The following example no longer works for me after upgrading to CGCalendar 1.5.2 and CMSMS 1.6.9
Any ideas?
Code:
{assign var='current_day' value='d'|date}
{assign var='weekday' value='N'|date}
{assign var='weekday' value="`$weekday-1`"}
{strip}
{$day_names[$weekday]} {$current_day} {$month_names[$month]} {$year}<br/>
{assign var='day' value=$days[$current_day]}
{if !empty($day.events)}
<div {if isset($day.class)}class="{$day.class}"{/if}>
<ul>
{foreach from=$day.events item=event}
<li><a href="{$event.url}">{$event.event_title}</a></li>
{/foreach}
</ul>
</div>
{else}
No events
{/if}
{/strip}
To display one day - specify template
Code:
{cms_module module='CGCalendar' display='calendar' calendartemplate='one_day'}
Any ideas?
Code:
{assign var='current_day' value='d'|date}
{assign var='weekday' value='N'|date}
{assign var='weekday' value="`$weekday-1`"}
{strip}
{$day_names[$weekday]} {$current_day} {$month_names[$month]} {$year}<br/>
{assign var='day' value=$days[$current_day]}
{if !empty($day.events)}
<div {if isset($day.class)}class="{$day.class}"{/if}>
<ul>
{foreach from=$day.events item=event}
<li><a href="{$event.url}">{$event.event_title}</a></li>
{/foreach}
</ul>
</div>
{else}
No events
{/if}
{/strip}
To display one day - specify template
Code:
{cms_module module='CGCalendar' display='calendar' calendartemplate='one_day'}