CGCalendar calendar template month switch not working prope

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 calendar template month switch not working prope

Post by josee225 »

Hi,

sorry if this was asked before, I've been through many pages of results without success...

We installed CGCalendar and are using the calendar template in our right column. But when we try to change months, lets says one month later, the page reloads, I still have my calendar in my right column in the current month and I get another calendar for the next month where my {content} tag is...

Is it at all possible to have the next (or previous) month display in the same spot?

Here are our information:
The tag calling CGCalendar - we need to keep inline='0', in order for our events to load in the detail page and not in the calendar spot:

Code: Select all

{cms_module module='CGCalendar' display='calendar' inline='0' use_session='true' detailpage='evenement'}
calendar template:

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}
and my system information

Code: Select all

Version du CMS 1.6.6
CMSMailer 1.73.14
FileManager 1.0.1
MenuManager 1.6.2
ModuleManager 1.3.1
News 2.10.3
nuSOAP 1.0.1
Printing 1.0.4
Search 1.6.1
ThemeManager 1.1.1
TinyMCE 2.5.5
FormBuilder 0.7
CGExtensions 1.19
NMS 2.3.2
CGCalendar 1.5.2
Unfortunately, for security reasons, I cannot give you access to the actual website, as it is currently protected by htaccess. So let me know if you need any more information and thank you for your help!
User avatar
opawaldburger
Forum Members
Forum Members
Posts: 94
Joined: Tue Nov 04, 2008 2:10 pm

Re: CGCalendar calendar template month switch not working pr

Post by opawaldburger »

change the inline attribute to 1.

Code: Select all

{cms_module module='CGCalendar' display='calendar' inline='1' use_session='true' detailpage='evenement'}

-opa
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

Re: CGCalendar calendar template month switch not working pr

Post by josee225 »

Thanks, but I forgot to mention that when we change the inline to 1, our events load in the same tiny space as our mini calendar. And that, evidently, will not do...
User avatar
opawaldburger
Forum Members
Forum Members
Posts: 94
Joined: Tue Nov 04, 2008 2:10 pm

Re: CGCalendar calendar template month switch not working pr

Post by opawaldburger »

So now things get interesting :)

Here's what I think the problem is. I guess that by adding the detailpage attribute, CGCalendar does not replace the {content} tag, but the {cms_module module='CGCalendar'}, which is actually in the 'evenement'-template.

Try this.

Code: Select all

{cms_module module='CGCalendar' inline='1'}
By the way, you don't need the other two attributes I removed, since they are set default anyway.

-opa
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

Re: CGCalendar calendar template month switch not working pr

Post by josee225 »

Definitely interesting!

Ok, we did exactly what you said, without change anything else.

The result is:
When we switch months, everything works fine, and stays in the calendar space.
When we click on a day, to see the events, we have the event in the default page AND in the calendar space :(

If you need screen shots, let me know! And thank you very much for helping me with this ;D
User avatar
opawaldburger
Forum Members
Forum Members
Posts: 94
Joined: Tue Nov 04, 2008 2:10 pm

Re: CGCalendar calendar template month switch not working pr

Post by opawaldburger »

Okay, so basically we need to 'tell' the sidebar-calendar to stay a calendar. The display param should do that...

Try this:

Code: Select all

{cms_module module='CGCalendar' display='calendar' inline='1'}
So I'm taking a part back of what I said in my last post. We'll need to have the display='calendar' stay :)
And thank you very much for helping me with this :D
You're very welcome :)

-opa
Post Reply

Return to “Modules/Add-Ons”