I have the following blocks of code that I can't seem to to work correctly. The list sets and populates perfectly, but the switchee statement doesn't work. I konw that it has do do with parse order but I can't figure out what is going on. The debug value of for the switchee tag is this:

{exp:switchee variable="M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr" parse="inward"}

It seems as though switchee is running before stash is parsing list_count, is there any way to fix this?

{exp:stash:set_list name="buy_now_options" parse_depth="4" parse_tags="yes" trim="yes"}
    {exp:channel:entries entry_id="{lv_site_buy_now}" status="open|closed" order_by="entry_id" sort="asc" limit="3"}
        {exp:stash:set_list:nested name="purchase_urls" context="{entry_id}" parse_tags="yes"}

{exp:stash:get_list name="buy_now_options" parse_tags="yes" parse_conditionals="yes"}
    {exp:switchee variable="{exp:stash:list_count name='purchase_urls' context='{item_entry_id}'}" parse="inward" }
        {case value="0"}
            <li><a href="{base_url}" target="_blank"><img src="{logo}" alt="{title} Web Store" /></a></li>
        {case default="yes"}
            <li><a href="{base_url}" data-reveal-id="{url_title}-modal"><img src="{logo}" alt="{title} Web Store" /></a></li>
  • Shot in the dark, but have you tried "nested" or another string after list_count? ...list_count:nested Oct 9, 2014 at 18:14
  • I just tried it, but it has the same result
    – JeremyC
    Oct 9, 2014 at 19:44

1 Answer 1


It looks like you're simply testing to see if the nested entries are empty or not. Could you not use something like:

{exp:stash:get_list name="buy_now_options" parse_tags="yes" parse_conditionals="yes"}
  {exp:stash:get_list:nested name="purchase_urls"}
  {if no_results}Show default link{/if}
  // There must be entries so show them

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.