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 A Msg if status=“closed”, {if no_results}, or if There IS a Result?

November 29, 2013 2:32pm

Subscribe [1]
  • #1 / Nov 29, 2013 2:32pm

    nyc

    66 posts

    I have a safecracker form I just converted to channel:form and I just changed it so when an entry is created it’s automatically set to status=“closed”

    What I’m trying to do is display a message if the created entry is still being moderated (status is closed), display a message if there is NO entry created, or display a msg if there IS an entry created.. How do I tell the difference?

    {exp:channel:entries
    channel="personal_trainer_directory"
    limit="1"
    dynamic="no"
    author_id="CURRENT_USER"
    status="closed"
    }
        ***DISPLAY IF STATUS IS CLOSED***
    {/exp:channel:entries}
    
    {exp:channel:entries
    channel="personal_trainer_directory"
    limit="1"
    dynamic="no"
    author_id="CURRENT_USER"
    }
        {if  no_results}
        ***DISPLAY IF NO RESULTS***
        {/if}
        ***DISPLAY IF THERE IS A RESULT***
    {/exp:channel:entries}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases