I am storing site settings using stash and would like to pull out the email address from stash and use it in the EE encode tag. Does anyone know if this is possible?
I have tried a few different things. Lastly this...
{encode="{exp:stash:get name='email'}?subject=Information About a Home" title="Email Us"}
It isn't rendering the stash variable inside the encode tag. Instead, I get the following:
<span data-eeencemail_tzeaewnqdt="1">
<a href="mailto:?subject=Information About a Home">Email Us</a>
</span>
* EDIT *
How I set the stash:
{!-- CONTACT EMAIL --}
{exp:stash:email}{contact_email}{/exp:stash:email}
* SOLUTION *
I was able to use this by utilizing the parse tags in stash to get around the parsing order on output.
So instead of this:
{encode="{exp:stash:get name='email'}?subject=Information About a Home" title="Email Us"}
I did this:
{exp:stash:parse}
{encode="{exp:stash:get name='email'}?subject=Information About a Home" title="Email Us"}
{/exp:stash:parse}
which worked perfectly.
* BETTER SOLUTION *
Even thought the above worked (Which I'm leaving in case someone didn't know about the stash parse tags), @natetronn's solution was much better since it uses the short syntax. Using the short syntax, it becomes this:
{encode="{exp:stash:email}?subject=Information About a Home" title="Email Us"}