CGCalendar issue multilang with calendar view

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

CGCalendar issue multilang with calendar view

Post by josee225 »

Hi,

I have the current problem:
I created a website in both french and english.
I am displaying a compact calendar on my home page, using this tag:

Code: Select all

{cms_module module='CGCalendar' lang=$lang_locale display='calendar' calendartemplate='compact' detailpage="evenements-carta-magica" category="Carta St-Hubert fr,Carta Décarie fr" use_session='true' inline='1'} 
When I click on a day with an event, the display page lists no events at all... If I remove use_session='true' inline='1', then I get results in both languages, so I get a page with duplicate events.
Here is the page: http://cartamagica.com/

I have another page that uses a calendar view, I don't have that problem:
http://cartamagica.com/evenements-carta-montreal.html

Here are my templates for both compact and regular calendar views:
Compact:

Code: Select all

{strip}
<table class="calendar" id="cal-calendar">
<caption class="calendar-month"><span class="calendar-prev"><a href="{$navigation.prev}">«</a></span> {$month_names[$month]} {$year} <span class="calendar-next"><a href="{$navigation.next}">»</a></span></caption>
<tbody><tr>
{foreach from=$day_names item=day key=key}
<th abbr="{$day}">{$day_short_names[$key]}</th>
{/foreach}</tr>

<tr>
{* initial empty days *}
{if $first_of_month_weekday_number > 0}
<td colspan="{$first_of_month_weekday_number}"> </td>
{/if}

{* iterate over the days of this month *}
{assign var=weekday value=$first_of_month_weekday_number}
{foreach from=$days item=day key=key}
{if $weekday == 7}
	{assign var=weekday value=0}
</tr>
<tr>
{/if}
<td {if isset($day.class)}class="{$day.class}"{/if}>
{if isset($day.events.0)}<a href="{$day.url}">{$key}</a>
{else}{$key}{/if}
</td>
{math assign=weekday equation="x + 1" x=$weekday}
{/foreach}

{* remaining empty days *}
{if $weekday != 7}
<td colspan="{math equation="7-x" x=$weekday}"> </td>
{/if}


</tr>
</tbody></table>

{/strip}
Calendar

Code: Select all

{strip}
<table class="calendar" id="cal-calendar">
<caption class="calendar-month"><span class="calendar-prev"><a href="{$navigation.prev}">«</a></span> {$month_names[$month]} {$year} <span class="calendar-next"><a href="{$navigation.next}">»</a></span></caption>
<tbody><tr>
{foreach from=$day_names item=day key=key}
<th abbr="{$day}">{$day_short_names[$key]}</th>
{/foreach}</tr>

<tr>
{* initial empty days *}
{if $first_of_month_weekday_number > 0}
<td colspan="{$first_of_month_weekday_number}"> </td>
{/if}

{* iterate over the days of this month *}
{assign var=weekday value=$first_of_month_weekday_number}
{foreach from=$days item=day key=key}
{if $weekday == 7}
	{assign var=weekday value=0}
</tr>
<tr>
{/if}
<td {if isset($day.class)}class="{$day.class}"{/if}>
{if isset($day.events.0)}<a href="{$day.url}">{$key}</a>
<ul>
{foreach from=$day.events item=event}
<li><a href="{$event.url}">{$event.event_title}</a></li>
{/foreach}
</ul>
{else}{$key}{/if}
</td>
{math assign=weekday equation="x + 1" x=$weekday}
{/foreach}

{* remaining empty days *}
{if $weekday != 7}
<td colspan="{math equation="7-x" x=$weekday}"> </td>
{/if}


</tr>
</tbody>
</table>

{/strip}
I am using all the latest versions of cmsms and modules. This website is live, so any help would be appreciated!
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

Re: CGCalendar issue multilang with calendar view

Post by josee225 »

Can anybody help me with this please!

I makes no sens to me that it would work in one tag and not the other...
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

Re: CGCalendar issue multilang with calendar view

Post by josee225 »

As I have not resolved this yet, any help would be greatly appreciated!
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

Re: CGCalendar issue multilang with calendar view

Post by josee225 »

Ok so I've been playing around with this, and nothing seems to work...

here is what I tried so far:
Adding inline='1'
Stops the calendar from showing up in my {content} when we change months, but when I click on a day to get a list of events, I end up with an empty page.

Adding inline='1' use_session='true'
Worked once, does not seem to work anymore.

Removing inline='1' use_session='true'
Now I can click on the calendar and see the events in the designated page. But the month switch in the home page displays in my {content}.

And no matter what I doo, I still get my results in french AND english, so all my events are doubled up.

If anyone could help me with this, it would be greatly appreciated!
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

Re: CGCalendar issue multilang with calendar view

Post by josee225 »

Anybody has suggestikns, as this situation is still not resolved?
Post Reply

Return to “Modules/Add-Ons”