Here's the code i'm essentially trying to achieve
{exp:stash:set="page_content"}
{exp:channel:entries channel="photos" dynamaic="off" entry_id="{structure:child_ids_for:1}"}
{!-- My Code --}
{/exp:channel:entries}
{/exp:stash:set}
This is my first problem {structure:child_ids_for:1}
is unable to output as a channel parmater. I tried to stash that structure variable, I tried it as a snippet and no luck with both. I'm also using template partials so that's why page_content
is being set.
This following code works with static values but not the {structure:child_ids_for:1}
tag in the stash set.
Works: {exp:stash:set name="photo_child_ids"}2|3|4{/exp:stash:set}
Doesn't Work: {exp:stash:set name="photo_child_ids"}{structure:child_ids_for:1}{/exp:stash:set}
Template Code
{exp:stash:set="page_content"}
{exp:stash:parse process="end"}
{exp:channel:entries channel="photos" parse="inward" dynamaic="off" entry_id="{stash:photo_child_ids}"}
{!-- EE Code --}
{/exp:channel:entries}
{/exp:stash:parse}
{/exp:stash:set}
Any Ideas?
EDIT: Thanks for the answers. The solution is below.
This stashes the structure child ID tag
{exp:stash:set name="photo_child_ids" process="end" parse_tags="yes"}{structure:child_ids_for:1}{/exp:stash:set}
This code gets that photo_child_ids stash variable and sets it as a parameter
{exp:stash:set name="page_content"}
{exp:stash:parse process="end"}
{exp:channel:entries channel="photos" parse="inward" dynamic="off" entry_id="{stash:photo_child_ids}"}
{!-- My Code --}
{/exp:channel:entries}
{/exp:stash:parse}
{/exp:stash:set}