ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Categories - Entries - output the category of one entry

May 08, 2012 4:31am

Subscribe [1]
  • #1 / May 08, 2012 4:31am

    A.Daniel

    12 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

  • #2 / May 09, 2012 11:14am

    Dan Decker

    7338 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,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases