Hi,
i wonder if its possible and if yes how i can change the CGCalendar output/template on Frontend to show 2 calendar tables, current and next on one page without "next" link.
Using CMSMS 1.5.4 and CGCalendar 1.1
CGCalendar displaying 2 months on one page
Re: CGCalendar displaying 2 months on one page
I'm resuming an old post, because I'm looking exactly for the same thing:
Two calendars on the same page, current month and next month.
I tried {cms_module module="CGCalendar" display="calendar" [glow=red,2,300]month="+1"[/glow]}
But it doesn't work. Did you Uniqu3 find a solution?
I'm using CmsMS 1.6.5 Poya, CGCalendar 1.2.5 and CGExtensions 1.17.4
Two calendars on the same page, current month and next month.
I tried {cms_module module="CGCalendar" display="calendar" [glow=red,2,300]month="+1"[/glow]}
But it doesn't work. Did you Uniqu3 find a solution?
I'm using CmsMS 1.6.5 Poya, CGCalendar 1.2.5 and CGExtensions 1.17.4
[Solved] CGCalendar displaying 2 months on one page
Hey, this has been solved! I emailed Uniqu3 and he emailed back a solution. He told me he found it on the forum months ago, but now I'm not able to find that post anymore so I'll write it here in case somebody is looking for the same thing.
Create a new Global Content Block, name it as you like and put this code in it:
Then simply call the Global Content Block where you want the 2 calendars displayed.
Uniqu3 reported troubles with month selection when clicking through months in the calendar. But I have disabled the 'next' and 'previous' arrows and I plan not to leave the users surf from one month to the other, so this solution is good for me. I hope it will be for others too.
Ciao!
Create a new Global Content Block, name it as you like and put this code in it:
Code: Select all
{assign var=monat value=$smarty.now|date_format:"%m"}
{assign var=jahr value=$smarty.now|date_format:"%Y"}
{cms_module module="CGCalendar" month=$monat year=$jahr}
{if $monat gt 11}
{assign var=monat1 value=$monat+1-12}
{assign var=jahr1 value=$jahr+1}
{cms_module module="CGCalendar" month=$monat1 year=$jahr1}
{else}
{assign var=monat2 value=$monat+1}
{cms_module module="CGCalendar" month=$monat2 year=$jahr}
{/if}
Uniqu3 reported troubles with month selection when clicking through months in the calendar. But I have disabled the 'next' and 'previous' arrows and I plan not to leave the users surf from one month to the other, so this solution is good for me. I hope it will be for others too.
Ciao!
Re: CGCalendar displaying 2 months on one page (Solved)
For me it is! (12 months on 1 page)
Thanks.
Thanks.
Re: CGCalendar displaying 2 months on one page (Solved)
THANKS RONNY!! Very easy integration... I have the code for a 12 month display but it's not pretty. Please contact me for it. I was usign it for a chalet rental and needed people to see upcomming availability for the year. BOOM!Inula wrote:For me it is! (12 months on 1 page)
Thanks.
Re: CGCalendar displaying 2 months on one page
Turn OFF your WYSIWYG and insert the following code:
Now turn it back on and you'll see what I've done. 3 columns and 4 rows for 12 months of Calendar!! All thanks to RonnyK!
Code: Select all
{assign var=maand value=$smarty.now|date_format:"%m"} {assign var=jaar value=$smarty.now|date_format:"%Y"}
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center" valign="top">{cms_module module="CGCalendar" month=$maand year=$jaar}</td>
<td align="center" valign="top">{if $maand gt 11} {assign var=maand1 value=$maand+1-12} {assign var=jaar1 value=$jaar+1} {cms_module module="CGCalendar" month=$maand1 year=$jaar1} {else} {assign var=maand2 value=$maand+1} {cms_module module="CGCalendar" month=$maand2 year=$jaar} {/if}</td>
<td align="center" valign="top">{if $maand gt 10} {assign var=maand3 value=$maand+2-12} {assign var=jaar3 value=$jaar+1} {cms_module module="CGCalendar" month=$maand3 year=$jaar3} {else} {assign var=maand4 value=$maand+2} {cms_module module="CGCalendar" month=$maand4 year=$jaar} {/if}</td>
</tr>
<tr>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand5 value=$maand+3-12} {assign var=jaar5 value=$jaar+1} {cms_module module="CGCalendar" month=$maand5 year=$jaar3} {else} {assign var=maand6 value=$maand+3} {cms_module module="CGCalendar" month=$maand6 year=$jaar} {/if}</td>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand7 value=$maand+4-12} {assign var=jaar7 value=$jaar+1} {cms_module module="CGCalendar" month=$maand7 year=$jaar3} {else} {assign var=maand8 value=$maand+4} {cms_module module="CGCalendar" month=$maand8 year=$jaar} {/if}</td>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand9 value=$maand+5-12} {assign var=jaar9 value=$jaar+1} {cms_module module="CGCalendar" month=$maand9 year=$jaar3} {else} {assign var=maand10 value=$maand+5} {cms_module module="CGCalendar" month=$maand10 year=$jaar} {/if}</td>
</tr>
<tr>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand11 value=$maand+6-12} {assign var=jaar11 value=$jaar+1} {cms_module module="CGCalendar" month=$maand11 year=$jaar3} {else} {assign var=maand12 value=$maand+6} {cms_module module="CGCalendar" month=$maand12 year=$jaar} {/if}</td>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand13 value=$maand+7-12} {assign var=jaar13 value=$jaar+1} {cms_module module="CGCalendar" month=$maand13 year=$jaar3} {else} {assign var=maand14 value=$maand+7} {cms_module module="CGCalendar" month=$maand14 year=$jaar} {/if}</td>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand15 value=$maand+8-12} {assign var=jaar15 value=$jaar+1} {cms_module module="CGCalendar" month=$maand15 year=$jaar3} {else} {assign var=maand16 value=$maand+8} {cms_module module="CGCalendar" month=$maand16 year=$jaar} {/if}</td>
</tr>
<tr>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand17 value=$maand+9-12} {assign var=jaar17 value=$jaar+1} {cms_module module="CGCalendar" month=$maand17 year=$jaar3} {else} {assign var=maand18 value=$maand+9} {cms_module module="CGCalendar" month=$maand18 year=$jaar} {/if}</td>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand19 value=$maand+10-12} {assign var=jaar19 value=$jaar+1} {cms_module module="CGCalendar" month=$maand19 year=$jaar3} {else} {assign var=maand20 value=$maand+10} {cms_module module="CGCalendar" month=$maand20 year=$jaar} {/if}</td>
<td align="center" valign="top">{if $maand gt 9} {assign var=maand21 value=$maand+11-12} {assign var=jaar21 value=$jaar+1} {cms_module module="CGCalendar" month=$maand21 year=$jaar3} {else} {assign var=maand22 value=$maand+11} {cms_module module="CGCalendar" month=$maand22 year=$jaar} {/if}</td>
</tr>
</tbody>
</table>