CGCalendar 1.12 categories output changed in templates

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Stom
Forum Members
Forum Members
Posts: 82
Joined: Tue Jul 31, 2007 1:41 am

CGCalendar 1.12 categories output changed in templates

Post by Stom »

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:

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}
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?
chandra

Re: CGCalendar 1.12 categories output changed in templates

Post by chandra »

Check

{$event|print_r}

for New variable names.
Post Reply

Return to “Modules/Add-Ons”