I'm trying to use the following conditionals in exp:stash:parse to set some values based on the category_id. However, I just can't get it to work and it always just gold for channel_colour or 20 for channel_category_group:
{exp:stash:set_list name="landing-{segment_1}" parse_tags="yes" parse_conditionals="yes" parse_depth="3" save="yes" refresh="60" scope="site" replace="yes"}
{exp:channel:entries
channel="landing_page"
disable="{global:channel_disable_basic}"
status="open"
limit="1"
}
{exp:stash:parse process="inline" parse_depth="2"}
{categories limit="1" show_group="5"}
{if category_id == "60"}
{exp:stash:set_value name="channel_short_name" value="things-to-do"}
{exp:stash:set_value name="channel_url" value="things-to-do"}
{exp:stash:set_value name="channel_category_group" value="2"}
{exp:stash:set_value name="channel_colour" value="blue"}
{if:elseif category_id == "62"}
{exp:stash:set_value name="channel_short_name" value="food-drink"}
{exp:stash:set_value name="channel_url" value="food-drink"}
{exp:stash:set_value name="channel_category_group" value="3"}
{exp:stash:set_value name="channel_colour" value="red"}
{if:elseif category_id == "61"}
{exp:stash:set_value name="channel_short_name" value="stay"}
{exp:stash:set_value name="channel_url" value="stay"}
{exp:stash:set_value name="channel_category_group" value="4"}
{exp:stash:set_value name="channel_colour" value="yellow"}
{if:elseif category_id == "63"}
{exp:stash:set_value name="channel_short_name" value="study"}
{exp:stash:set_value name="channel_url" value="study"}
{exp:stash:set_value name="channel_category_group" value="20"}
{exp:stash:set_value name="channel_colour" value="green"}
{if:else}
{exp:stash:set_value name="channel_colour" value="gold"}
{/if}
{/categories}
{/exp:stash:parse}
{/exp:channel:entries}
{/exp:stash:set_list}
Wondered if someone can help figure out what's going on?
Thanks,