CGCalendar 1.15.3 and Smarty
Posted: Thu Aug 13, 2015 10:53 pm
Hi,
Somebody had previously helped me put together this great code to switch between Calendar View and List View in CMS 1.11.4, with CG Calendar 1.10.4 (see below).
I just updated my CMS to 1.12, and my cgcalendar to 1.15.3.
When I put the code into my updated CMS, it no longer does switches between the views. Could somebody look to see if there is something that needs to be changed?
CODE on page:
{if $smarty.get.view == 'list'}{$calendarview='list'}{else}{$calendarview='calendar'}{/if}
<div class="cal-calendar">
{cms_module module="CGCalendar" display=$calendarview calendartemplate="calendarview" listtemplate="listview" category="Calendar of Events"}
</div>
CODE in calendar template:
<div class="change-view">
<h4>Calendar View:
{if $calendarview=='list'}
{cms_selflink page=$page_alias text='Switch to Calendar View'}
{else}
{cms_selflink page=$page_alias urlparam='?view=list' text='Switch to List View'}
{/if}
</h4>
</div>
Somebody had previously helped me put together this great code to switch between Calendar View and List View in CMS 1.11.4, with CG Calendar 1.10.4 (see below).
I just updated my CMS to 1.12, and my cgcalendar to 1.15.3.
When I put the code into my updated CMS, it no longer does switches between the views. Could somebody look to see if there is something that needs to be changed?
CODE on page:
{if $smarty.get.view == 'list'}{$calendarview='list'}{else}{$calendarview='calendar'}{/if}
<div class="cal-calendar">
{cms_module module="CGCalendar" display=$calendarview calendartemplate="calendarview" listtemplate="listview" category="Calendar of Events"}
</div>
CODE in calendar template:
<div class="change-view">
<h4>Calendar View:
{if $calendarview=='list'}
{cms_selflink page=$page_alias text='Switch to Calendar View'}
{else}
{cms_selflink page=$page_alias urlparam='?view=list' text='Switch to List View'}
{/if}
</h4>
</div>