0

Based on the documentation, {exp:low_search:results} has a default:parameter param.

Lets say that I have a channel foo that has relationship field y where the entries have entry_id 1,2 or 3

Can I make {exp:low_search:results} default the search to filter for y?

Does at least one of the code below work?

{exp:low_search:results
   default:y="1" 
}

or

{exp:low_search:results
   default:y[]="1" 
}

or

{exp:low_search:results
   default:child:y="" 
}

or

{exp:low_search:results
   default:child:y[]="" 
}
1

Your third example should work. It's the regular parameter name, prefixed with default:. The parameter name for the (child) Relationship filter is child:field_name, so the default version becomes default:child:field_name. Applied to the Results tag, this becomes:

{exp:low_search:results default:child:field_name="1|2|3"}

Note: The square brackets [] only apply to input fields in your Form and only for multi-valued attributes. It never appears in either parameter names of an EE tag or variable names.

Square brackets are only used in the name attribute of <input>, <select> or <textarea> HTML elements.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.