I have this code fragment that works in a template when running EE2, but fails when the same template is run under EE3. I can't work out why. Would value any guidance anyone can give about how to fix. The fragment is:
{exp:stash:category_image parse="yes" trim="yes" output="yes"}
{exp:category_construct:categories entry_id="{what_we_do_item_selector:image_button_switcher:entry_id}"}
{if construct:level_count == "1"}
{exp:channel:categories show="{construct:cat_id}" style="linear"}
{category_image}
{/exp:channel:categories}
{/if}
{/exp:category_construct:categories}
{/exp:stash:category_image}
which sets a value that is retrieved later within the same template using
{exp:stash:get name="category_image"}
It is a bit messy because category:construct
cannot limit its output to a single entry using a tag parameter, and it is difficult to retrieve the category_image
for a channel entry.
I am aware that the stash tag uses the 'short form' tag - but weirdly if I replace this with the long form tag, the tag fails in both EE2 and EE3.
This suggests I'm doing something that is probably illegitimate, but I cannot see what it is.
Anyhow - if anyone has any ideas about how I can capture the category_image URL more efficiently I'd be pleased to hear.
Thanks in advance for whatever help you can provide.
For clarity, I'm using EE2.11.3 / EE3.4.6 and Stash 3.0.4