I'm using EE 2.7.2 with Stash 2.4.7.
I'm attempting to stash an entry_id and then retrieve it again elsewhere on the page.
I've got a site with two important channels - people and awards. On each award, I've got a relationship field (award_winner) that points to someone in the people channel.
On any given award detail page, I'm trying to pull in a bunch of information related to the award winner and stick it in a sidebar.
At the top of a page, I stash an entry ID for a related entry.
{exp:stash:parse}
{exp:channel:entries channel="awards"}
{award_winner}
{exp:stash:set_value name="winner_id" value="{award_winner:entry_id}"}
{/award_winner}
{/exp:channel:entries}
{/exp:stash:parse}
This is working correctly. If I do a *{exp:stash:get name="winner_id"}* on its own, I get the proper entry ID, but it's not showing up when I try to stick it into exp:channel:entries.
Down in the sidebar, I'm pulling in a list of entries related to that award winner.
And I'm trying to do that like so:
{exp:channel:entries channel="people" entry_id="{exp:stash:get name="winner_id" parse="inward"}" dynamic="no"}
<h2>Other awards won by {title}</h2>
<ul>
{parents field="award_winner"}
<li>{parents:title}</li>
{/parents}
</ul>
{/exp:channel:entries}
When it gets to this second part, it's returning all entries in the people channel, instead of just the one defined by *winner_id*.
The end goal, will be to have a bunch of channels (news, media, etc) that all relate to individuals, and that sidebar area is going to pull in (on any given page) a bunch of related items from multiple channels.