Low Search Variables
Hi Low,
Where can I find a list of variables that can be used with Low Search?
I noticed that the {low_search_keywords}, {absolute_results}, and {low_search_collection_label} variables (and maybe more) are not listed anywhere on this page: http://gotolow.com/addons/low-search/... (where I thought they'd be), even though they are used in the examples (http://gotolow.com/addons/low-search/...).
Thanks,
Stephen
Replies
Low 6 Jun 2014 15:54
There isn't a set list of variables. It all depends on which parameters you use. See this: http://gotolow.com/addons/low-search/...
In the Results tag, all channel:entries variables are available + {low_search_param} vars.
Stephen 6 Jun 2014 16:00
Do you mean 'tag' rather than 'parameters' there? I'm specifically asking about the variables I can use, not the parameters.
For example, shouldn't the {low_search_keywords} variable be listed in the variables section of the results tag? http://gotolow.com/addons/low-search/...
Low 6 Jun 2014 16:59
No, I do mean parameters. To quote the docs I linked above:
I deliberately removed all filter-specific vars from the Results Tag docs, because they are implied for each filter. As the Results Tag docs state:
So, you mention {low_search_keywords}. The parameter here is keywords, which is part of the Keywords filter.
Same principle applies to, say, {low_search_distance:radius}. Parameter is distance:radius, which is part of the Distance filter.
Same principle applies to {low_search_search:matrix_field:some_col}. Parameter is search:matrix_field:some_col, which is part of the Field Search filter.
The rule, as stated, is:
param_name="val" --> {low_search_param_name} (which outputs "val")
The same rule applies to any custom or future filter, too.
Stephen 9 Jun 2014 12:45
Thanks for explaining that Low. It makes sense now I've read it twice. I'm just used to quickly scanning EE docs for parameters or variables in a 'quick reference' type of way, which is why I came unstuck here.