If Ampersands IN Variables for Conditionals
Hello,
I'm currently having issues with variables on a multiple select drop down. All values in each option are correctly selected through the IN conditionals, except if they have an ampersand in them.
For example:
{if 'color & spot' IN ({low_search_search:test})}selected{/if}>Color & Spot
If it has an ampersand, it never becomes selected. Others will select. I've tried selecting multiple items, or just the 'color & spot' option. No matter what, color & option won't show.
The interesting thing is that before I was using a multiple select, they were working fine within {if low_search_search:test == "color & spot"}. I tried this method with the multiple select and no luck. I'm curious if I should just change all the color & spot to color and spot and give up. Or perhaps im missing something?
I've outputted the {low_search_search:test} and it says "color & spot" - so its exactly what i'm trying to test against, it just not finding within the low_search variable.
Thanks for your time!
Replies
Low 17 Feb 2014 11:04
That's basically a result of how parameters can work. It's a bit of a technical story, but the best way around it now, would be to use "color and spot" (or color + spot).
Jordan Sowers 17 Feb 2014 11:06
Dang. Always quick! Thanks! I'll get to it. Sorry if this was posted somewhere else.
Low 17 Feb 2014 11:07
No worries. Another solution would require a hack, but I don't think I'd add that to the core, so you'd need to re-apply for each update.