I have an EE embed that processes PHP code. I would like to capture that output with a Stash variable.
I'm using a model/view approach, ie. have one template to retrieve the data and another to output the page.
I have this code working correctly in my model:
{exp:stash:set name="my_var"}
{embed="resources/store-post-data"}
{/exp:stash:set}
<h2>Test</h2>
{exp:stash:my_var}
and get results as expected:
Test
MyPostParameterValueHere
But when I use the exact same code
{exp:stash:my_var}
in my view I get the string
{embed="resources/store-post-data"}
and not the output of the embed.
What am I missing?