Can I use a Low Variable from another MSM site in a JS file?
Hi,
I store my JS files as templates in EE. It works great because then I can pass Low Variables into my JS. This works properly:
var phoneNaturalSearch = '{lv_phone_natural_search}';
Now I need to share this script with another site (I'm using MSM). I'd like to keep the Low Variables in place so that I don't need to hard-code them. So, I tried this:
var phoneNaturalSearch = '{exp:low_variables:parse var="default_site:lv_phone_natural_search"}';
Which does not work. Do you have any recommendations on what I may be doing wrong? Should this work?
Replies
Low 10 Oct 2012 07:57
Yeah, it should work. Make sure the site short name (default_site) is correct. Also try and use {exp:low_variables:single}, especially if you have other Parse tags in the template.