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.

Conditional Question

January 27, 2011 7:26pm

Subscribe [2]
  • #1 / Jan 27, 2011 7:26pm

    Geoff Towle

    330 posts

    I’m trying to add a highlight for specific entries and thought I could use a category and a conditional.  So I created a new category group, created a category named Important (ID = 9) and added that category group to the appropriate Channel.

    I have set an entry to the Important category as a test, and in the template I setup this conditional—but it’s not working, meaning the class “green” is not being applied.  Any idea what I’m doing wrong?  I assume I can check for the category parameter, can’t I?

    
    									
  • #2 / Jan 28, 2011 11:02am

    Ingmar

    29245 posts

    You’ll need to wrap it in a {categories} tag pair, like so:

    {categories}{category_id}{/categories}
  • #3 / Jan 28, 2011 11:50am

    Geoff Towle

    330 posts

    That did it.  Thanks again, Ingmar!

  • #4 / Jan 29, 2011 4:38am

    Pascal Kriete

    2589 posts

    Glad Ingmar got you squared away.

    Don’t hesitate to start a new thread if anything else comes up.

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

ExpressionEngine News!

#eecms, #events, #releases