Hi I have the following code:
<div class="row-fluid">
<div class="span12">
<h3>Top 10 most popular</h3>
<ul>
{exp:channel:entries channel="faqs" dynamic="no" limit="10"}
<li><a href="{url_title_path='help'}">{title}</a></li>
{/exp:channel:entries}
</ul>
<h3>Answer to selected question</h3>
{exp:channel:entries channel="faqs" dynamic="yes" require_entry="yes" limit="1"}
{if no_results}
<p>Click a question above to see the answer here</p>
{/if}
{answer}
{/exp:channel:entries}
</div>
</div>
So as you can see I am looping through faqs twice. The first set it to get all of the questions and then if a user clicks on a question thats when the second loop should kick in to show them the answer. This works fine apart from the no results statement in the second loop doesn't work. It just never gets output. Anyone know why?
no_results
does not work as expected in that circumstance. If that is the case for you then this thread may help. – Sekono_results
tag seems to be working just fine to redirect to the 404 template, though I could have sworn I'd seen it not working in the past. What version of Stash are you using? – Sekono_results
working with Stash was just a matter of using the beta version and theno_results_prefix
(see my answer below). – Seko