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 only the categories for the entry I'm in

December 03, 2009 1:55pm

Subscribe [2]
  • #1 / Dec 03, 2009 1:55pm

    slbedard

    29 posts

    Hello-

    I am trying to do something which seems fairly simple…but I can’t get it to work.  When I land on a entry page—I would like to display ONLY the categories that are related to that entry.

    I’ve explored several parameters of the category tag…but can’t get it to display ONLY the categories related to an entry.  I realize I could hard code into the template which categories to display—but I need this to be dynamic—so any entry you click on will retrieve categories related to it.

    thanks for your help,

    -summer

  • #2 / Dec 03, 2009 3:36pm

    Boyink!

    5011 posts

    You want the {categories}{/categories} looping pair for the weblog entries tag instead.

  • #3 / Dec 03, 2009 3:44pm

    slbedard

    29 posts

    great- that worked, thank you!

  • #4 / Dec 09, 2009 3:54pm

    slbedard

    29 posts

    Hi—having one more problem with this code.  I am trying to display categories from only one category group (#2 and not #1)  I have tried putting cateogry_group=“not 1” into my weblog entries tag (as shown below) and also in the categories looping pair…but it still displays both category groups. What am I doing wrong?

    thanks!

    
    									
  • #5 / Dec 09, 2009 3:56pm

    Boyink!

    5011 posts

    Not to be “that guy”...but reading the docs on the categories looping pair might provide a clue..😉

  • #6 / Dec 09, 2009 4:02pm

    slbedard

    29 posts

    ah—

    {categories show="not 3|6|8"}


    fixed!  thank you.

  • #7 / Dec 09, 2009 4:02pm

    Boyink!

    5011 posts

    Yep!

    Glad you got it sorted.

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

ExpressionEngine News!

#eecms, #events, #releases