CGCalendar 1.12 categories output changed in templates
Posted: Mon Nov 11, 2013 4:30 pm
I've just upgraded to the latest CGCalendar and it's broken one of my templates. I have a template that puts images next to entries in a certain category.
I think the output from $event.categories.fieldname has changed. Previously it would output the name of the category. Now it seems to be just outputting a number?
Sample code below:
This used to work until the update. Am I right in assuming the number I'm now presented with is the ID of the category instead of the name? Is there an easy way to see which category has what ID?
I think the output from $event.categories.fieldname has changed. Previously it would output the name of the category. Now it seems to be just outputting a number?
Sample code below:
Code: Select all
{foreach from=$event.categories key='fieldname' item='fieldvalue'}
{if $fieldvalue != '' && $catimg != '1'}
{if $fieldname|strstr:"green"}
<div class="icon"><h3>Green</h3><img src="green.jpg" /></div>
{elseif $fieldname|strstr:"blue"}
<div class="icon"><h3>Blue</h3><img src="blue.jpg" /></div>...
{/if}
{/if}
{/foreach}