Display Low Variable value using Stash and Matrix
I'm using Low Variables to set an Age Policy on a show page. I have nine different Age Policies that an editor can choose from to attach to a show. Depending on the city a show can have a different Age Policy. I'm using a combination of Stash, Matrix and Low Variables to accomplish Age Policy and Age Policy overrides depending on city. Here's how I have it laid out:
{!-- Set Age Policy --}
{exp:stash:set name="age_policy"}{/exp:stash:set}
{if show_age_policy}
{exp:stash:set name="age_policy"}{show_age_policy}{/exp:stash:set}
{/if}
{show_override_age_policy}
{if "{override_city:child_ids}" == "{exp:stash:get name='city_entry_id'}"}
{exp:stash:set name="age_policy"}{override_age_policy}{/exp:stash:set}
{/if}
{/show_override_age_policy}
{!-- Get Age Policy --}
{if {exp:stash:not_empty name="age_policy"}}
{exp:low_variables:single var="{exp:stash:get name='age_policy'}" parse="inward"}
{/if}
The problem is that I'm trying to display the value of the textarea that the Age Policy Low Variable contains. Instead I get the var name, ex. lv_age_policy_1, etc.
How do I use the captured var to display the textarea content? Or maybe there's something bigger going on?
Low Variables 2.5.0 on EE 2.10.1
Replies
Low 28 Jul 2015 20:49
So, Matrix and Stash aside, if you just use {exp:low_variables:single var="lv_age_policy_1"}, do you get the correct output?
If so, then this is a parse order issue which touches Stash more than LV, really.