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.

using status as a conditional

May 02, 2011 10:57am

Subscribe [3]
  • #1 / May 02, 2011 10:57am

    transparentb

    24 posts

    Hi,

    I’m trying to do something like:

    {exp:channel:entries channel="videos" status="premium|free"}
    <h4>{if status == "free"}free{/if}</h4>
    <p>{/exp:channel:entries}

    But it seems to just ignore the conditional. How can I do this?

    Thank you!

  • #2 / May 02, 2011 1:27pm

    Mark Bowen

    12637 posts

    That code should definitely work. Have you checked to ensure that your status was created with a lower case f and not perhaps a capital F?

    Statuses are case sensitive so it might be something as simple as that maybe?

    Hope that helps a bit.

    Best wishes,

    Mark

  • #3 / May 02, 2011 10:17pm

    Marcus Neto

    1005 posts

    transparentb,

    Did you double check what Mark suggested? It should work.

  • #4 / May 02, 2011 10:21pm

    transparentb

    24 posts

    That worked. Thank you for the fast replies guys.

  • #5 / May 02, 2011 10:59pm

    John Henry Donovan

    12339 posts

    Good stuff 😊 Please start a new thread if you have any more questions

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

ExpressionEngine News!

#eecms, #events, #releases