I think I may be getting a parse order problem when I try and use Low's seg2cat variable in a conditional with Stash.
Here's my code:
{exp:stash:set name="pg_content_left"}
{if segment_2_category_id != ''}
{exp:stash:set_list name="news_list" parse_tags="yes" parse_depth="2"}
{exp:channel:entries channel="news" status="open|featured" orderby="date" sort="desc" limit="10" category="{segment_2_category_id}"}
{stash:item_title}{title}{/stash:item_title}
{/exp:channel:entries}
{/exp:stash:set_list}
{/if}
{/exp:stash:set}
Here's my error message:
A PHP Error was encountered
Message: Invalid EE Conditional Variable: {if segment_2_category_id != ''}
If I run the IF statement outside of stash:set it fails gracefully. I presume Stash is being parsed before low seg2cat variable is available. Anyone know how I can get around this?
Thanks.