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 no_results} - not working as expected

May 18, 2012 12:08pm

Subscribe [1]
  • #1 / May 18, 2012 12:08pm

    EE 2.4

    So when I have no entries on this page the no_results conditional is not working at all. I’ve simplified the template here but as far as I can tell it should work. Thoughts?

    {exp:channel:entries channel="events" limit="3" disable="category_fields" paginate="bottom" {if segment_2 =="archives"}show_future_entries="yes"{/if} }
    
            {if no_results}
              <section class="blog-post">
                <h3>something here</h3>
    <p>              message<br />
              </section><br />
            {/if}<br />
    more code here<br />
    {/exp:channel:entries}

  • #2 / May 21, 2012 11:54am

    Dan Decker

    7338 posts

    Hi LMA Communications,

    What are you seeing instead?

    Have you tried adding the dynamic=“off” parameter?

    I’ve simplified the template here…

    It is more helpful to see the whole template. Never hesitate to share the big picture! There could be things in play that would affect this tag pair.

    Cheers,

     

     

  • #3 / Jun 13, 2012 4:43pm

    Chad Crowell

    242 posts

    I’m sure you mean dynamic=“no” Dan.

  • #4 / Jun 14, 2012 3:33pm

    Dan Decker

    7338 posts

    Hey Chad,

    I’m sure you mean dynamic=“no” Dan.

    Dude, I’m old-school :-p

    Indeed, dynamic=“no” is what the kids are saying these days.

    Cheers!

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

ExpressionEngine News!

#eecms, #events, #releases