Page 2 of 2

Re: CGCalendar display single day - today!

Posted: Tue Nov 30, 2010 11:48 pm
by Franck
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 ?

Re: CGCalendar display single day - today!

Posted: Wed Dec 01, 2010 10:47 pm
by Franck
ok I found the solution: it's working much better with display='list' and a good template.

Re: CGCalendar display single day - today!

Posted: Sat Apr 02, 2011 11:14 pm
by d8wave
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'}