Closed roberthallatt closed 2 years ago
That means the {user_language}
variable hasn't been replaced with its value at the point the {exp:stash:set...}
tag runs. You can use parse="inward"
to tell a {exp:...}
tag to parse variables passed in parameters.
{exp:stash:set_value name="top-menu-{user_language}" value="{stash:embed:partials:main-menu-{user_language}}" parse="inward"}
If I remember correctly (it's been a while!), you could also do without the set_variable and use an explicit name and filename to load your embed file into a variable:
{exp:stash:embed name="top-menu-{user_language}" file_name="partials:main-menu-{user_language}}" parse="inward" output="no" process="inline"}
After upgrading to the latest version of Stash, if I include {user_language} as part of the value, it won't parse correctly.
{exp:stash:set_value name="top-menu-{user_language}" value="{stash:embed:partials:main-menu-{user_language}}"}
If I hardcode the language replcing {user_language} with en or fr, it works correctly. Not sure if this is an EE or Stash thing. Any ideas on how I might be able to get this working again?