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.

if statement for 0 results

May 16, 2012 8:00pm

Subscribe [2]
  • #1 / May 16, 2012 8:00pm

    imagineer

    8 posts

    I’ve tried {if count==0} and all kinds of variants, but I simply cannot put a message saying there are no listings available if there are no entries or all entry statuses are set to ‘off’. I’m sure I’ve had this working on other ee sites.

    {exp:channel:entries channel="classifieds" dynamic="off"}
      {if absolute_results < 0 }
       There are classified listings
      {if:else}
       There are currently no classified listings
      {/if}
    {/exp:channel:entries}
  • #2 / May 17, 2012 3:59am

    verse

    26 posts

    This should do it

    {if no_results} no results {/if}
  • #3 / May 17, 2012 4:06am

    imagineer

    8 posts

    Winning!~

  • #4 / May 17, 2012 4:05pm

    Shane Eckert

    7174 posts

    Hey imagineer,

    I am glad to see that rmdy was able to help you out!

    If you need anything else, please just let us know by opening a new thread.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases