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 if:else, or what to do if no entries exist?

October 26, 2010 11:53am

Subscribe [2]
  • #1 / Oct 26, 2010 11:53am

    andrew_spl

    71 posts

    I’m really confused about using if:else. I’m assuming I need to put the statement inside the weblog tag. But if I want to show alternative text if there are no entries in that weblog what should I put? I’ve tried using:

    {if total_entries < 1}
        There are no entries
    {if:else}
        These are the entries.
    {/if}

    But I get no results at all.

    Thanks for any help.

  • #2 / Oct 26, 2010 12:18pm

    andrew_spl

    71 posts

    Problem resolved I’ve just used this:

    {if no_results}

    Thanks

  • #3 / Oct 26, 2010 3:12pm

    Ingmar

    29245 posts

    Thanks for letting us know. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases