Page 1 of 1

category_name

Posted: Fri Aug 15, 2008 4:39 pm
by reinhardl
hi,

when I call an category in s9y, the $category_info.category_name will have the name of the category.

when I call an entry, how can I get the category name for this entry?

thanks

Posted: Fri Aug 15, 2008 8:27 pm
by judebert
An entry an be in multiple categories, so this doesn't exactly apply.

However, each entry has one 'categories' array, which contains a nested array for each category the entry is assigned to. Each nested array holds the name, icon, description, and link for the category.

You can see an example in the entries.tpl of the default/ template. Search for {if $entry.categories} to see where we print all the categories for the entry.

Posted: Sat Aug 16, 2008 8:08 am
by reinhardl
it works - thanks