category_name

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
reinhardl
Regular
Posts: 258
Joined: Wed Jun 20, 2007 8:54 am
Location: Germany

category_name

Post 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
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
reinhardl
Regular
Posts: 258
Joined: Wed Jun 20, 2007 8:54 am
Location: Germany

Post by reinhardl »

it works - thanks
Post Reply