I have two Stash embeds. Both embed templates accept a color
variable, but it's optional:
{if '{stash:color}'}
{stash:color}<br>
{/if}
If I explicitly set the variable in both embeds, everything works as expected:
{exp:stash:embed name='template1' stash:color='Red'}
{exp:stash:embed name='template2' stash:color='Green'}
Outputs:
Red
Green
If I set the variable in the first embed but not the second, it also works as expected:
{exp:stash:embed name='template1' stash:color='Red'}
{exp:stash:embed name='template2'}
Outputs:
Red
But if I leave the first variable empty and set the second, both are assigned the second value:
{exp:stash:embed name='template1'}
{exp:stash:embed name='template2' stash:color='Green'}
Outputs:
Green
Green
Is this a bug? Shouldn't Stash embed variables only be scoped to the embed template they're passed to?
- Stash 2.6.0
- EE 2.10.1