How do you return a message if no entries are found? I thought this would be very easy but I'm having a hard time figuring it out.

How do you output a warning/message if there are no entries to loop through?

{% set entries = craft.entries.section('news').limit(5).find() %}

{% if entries|length %}
    {% for entry in entries %}
      {# Do Loop #}
    {% endfor %}
{% else %}
    &lt;p&gt;No entries found.&lt;/p&gt;
{% endif %}


Or am I just sleepy and approaching this all wrong?
The for tag has an else clause by which you can render a replacement block if no iteration took place because the sequence was empty.

&lt;ul&gt;
    {% for user in users %}
        &lt;li&gt;{{ user.username|e }}&lt;/li&gt;
    {% else %}
        &lt;li&gt;&lt;em&gt;no user found&lt;/em&gt;&lt;/li&gt;
    {% endfor %}
&lt;/ul&gt;


reference: http://twig.sensiolabs.org/doc/tags/for.html#the-else-clause