EllisLab text mark
Advanced Search
     
Categories - Entries - output the category of one entry
Posted: 08 May 2012 04:31 AM   [ Ignore ]
Avatar
Joined: 2012-01-19
13 posts

How do i - output the category of one entry?

lets say i have a channel design with entries divided in category like web design grafic design etc…
and i have a template where i show 1 particular entry; How do i show the category/categories associated with this entry?

if i use

{categories} {category_name}  {/categories} 

inside the

{exp:channel:entries channel="design"
it’s show the right stuff,  but i can not find any documentation about
{categories} 

i found this code searching in google,

instead i found documentation about this

{exp:channel:categories channel="design" }
    {category_name}
{
/exp:channel:categories} 

this latest code it’s show all the categories asociated with the channel “design” and not the categories asociated with my particular entry

this is posted wrong, i’m using ee 2.4

 
Posted: 09 May 2012 11:14 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2005-10-18
7340 posts

Hi A.Daniel,

Thanks for your question!

The tag you are looking for is a variable pair in the Channel Entries tag. The User Guide on the [categories} variable pair shows all the parameters and variables that are available for the pair.

Is there anything else I can assist you with?

Cheers,

 Signature 

How may I help you?