Page 1 of 1

CGCalendar 1.14.3 how show category in detail template

Posted: Mon Jun 30, 2014 1:14 am
by nikkio
Hi all,

as the subject... how can I show the list of associated category in detail view of the event?

I've tried this but do not work

Code: Select all

{if isset($event.categories)}
{foreach from=$event.categories item='category'}
{$category->name}
{/foreach}
{/if}
Any help is appreciated

thank you!

Re: CGCalendar 1.14.3 how show category in detail template

Posted: Mon Jun 30, 2014 3:41 am
by calguy1000
In the event template:

{$event.categories} is an array of integer category id's.
{$event.category_names} is a string with a , separated list of category names.

Re: CGCalendar 1.14.3 how show category in detail template

Posted: Mon Jun 30, 2014 8:36 am
by nikkio
Thank you Calguy!

It works!
calguy1000 wrote:In the event template:

{$event.categories} is an array of integer category id's.
{$event.category_names} is a string with a , separated list of category names.