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.

display categories assigned to an entry

October 14, 2011 8:43pm

Subscribe [3]
  • #1 / Oct 14, 2011 8:43pm

    bsullan

    6 posts

    I have a simple question but can’t figure it out. All I want to do is display the specific categories assigned to an entry, at the end of the entry. So, I create a new entry and at the end of it I want to display “Filed under:” and then list the categories that were checked when I created the entry. All I can figure out so far is how to display all the entries created for the channel, not just the ones that were assigned to a particular entry. I also then want to make the category tags linkable to an archive page that shows all entries that have that category assigned to them Thanks.

  • #2 / Oct 16, 2011 11:02am

    John St-Amand

    865 posts

    If you are using the categories tag pair inside your entries loop, EE would only display the categories to which the entry in question has been assigned.  There are then variables within the categories tag pair that you can use to dynamically create the archive links you need.

    Hope that helps.

  • #3 / Oct 16, 2011 2:17pm

    bsullan

    6 posts

    Got it, thanks. The first set of code under the Categories section (shown below) was what I needed. I looked through this section before but didn’t make the connection. I was looping on something else, not the category tag itself.

    {categories}
          {category_image}
          {category_name}
    {/categories}

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

ExpressionEngine News!

#eecms, #events, #releases