Closed airways closed 9 years ago
EE caches identical tags, which can indeed have unexpected results if you change the value of the variable between instances of the tag - in loops, for example. You can use context="x" (where x is a unique value) when setting/getting a variable to give each instance a unique namespace. Or, you could consider using lists instead of variables.
If the value of your variable doesn't change then you can use it as a placeholder {stash:something}
in Stash embeds. Or, if you prefer, set type="snippet" and access it like {something}
. Either is more efficient than using a tag.
I am getting, well, basically random results from particularly {exp:stash:get} and {exp:stash:{varnname}} if I do NOT have "random" added to the tag:
{exp:stash:get name="something" random} {exp:stash:something random}
There doesn't seem to be much mention of this in the docs, and it's fairly frustrating, somewhat limits stash's ability to help with reducing the amount of code and dumb-ness of a complex template.