Hoping someone can help me with this problem. I have a list of channel entries that I am storing in a stash tag then outputting the complete list, but if there are no entries then it displays something else.
What I am hoping to do is if the total count of entries == 0 then display one thing, if the count == 1 then display something else and finally if the count is > 1 then display a third option to the viewer.
Here is the code that I currently have.
{exp:stash:set name="dynamic_adventure" trim="yes" parse_tags="yes" parse_depth="2"}
{exp:channel:entries channel="adventure_settings" dynamic="no" author_id="CURRENT_USER"}
{exp:switchee variable="{embed:adventure_name}" parse="inward"}
{case value="{dynamic_adventure_template:title}"}
<a href="{path="admin/{dynamic_adventure_template:url_title}"}/{url_title}" class="button small red">View Adventure</a><br>
{/case}
{case value=""}
{/case}
{/exp:switchee}
{/exp:channel:entries}
{/exp:stash:set}
{if {exp:stash:not_empty name="dynamic_adventure"} }
<h2 class="th-adventure-title">{embed:adventure_name}</h2>
{exp:stash:get name="dynamic_adventure"}
{if:else}
<h2 class="th-adventure-title">{embed:adventure_name}</h2>
<a href="{path="admin/new-adventure"}" class="button small red">Start New Adventure</a>
{/if}
Any help is greatly appreciated. Thanks