Hi,
I’m working on a travel site. Every trip has type and a country. I’d like to search in the trips via dropdwons of the possible listitems of those 2 lists. How should I do that?
For example, give me all exclusive trips to the Bahama’s.
Michel
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
February 23, 2011 10:36am
Subscribe [2]#1 / Feb 23, 2011 10:36am
Hi,
I’m working on a travel site. Every trip has type and a country. I’d like to search in the trips via dropdwons of the possible listitems of those 2 lists. How should I do that?
For example, give me all exclusive trips to the Bahama’s.
Michel
#2 / Feb 23, 2011 4:38pm
Have you considered using dynamic parameters?
#3 / Feb 24, 2011 10:27am
Hi Ingmar,
I’m trying this code:
{exp:channel:entries channel="fotos_front" limit="1" orderby="{random}" dynamic_parameters="search:landen"}I’m using this in my calling page:
<form action="{path='site/search_partners_results'}" method="post">
<select name="search:landen">
<option value="">Kies een land…</option>
<option value="Canada">Canada</option>
<option value="Bahamas">Bahamas</option>
</select>
<input type="submit" value="Submit">
</form>But it doesn’t seem to work. Do you see an error. Also, in the docs, it syas dynamic_parameters only works with drop down lists an d2 other. Does it mean it won’t work with Multiselect fields?
Michel
#4 / Feb 25, 2011 1:16am
Michel,
What doesn’t work?
Try adding more to your limit and removing the random orderby
Also make sure your form is outside your channel:entries tag
{exp:channel:entries channel="fotos_front" limit="15" sort="asc" orderby="title" dynamic_parameters="search:landen"}Also, in the docs, it syas dynamic_parameters only works with drop down lists an d2 other. Does it mean it won’t work with Multiselect fields?
Yes only dropdown list and not Multiselects
An alternative would be chained selects but might not be what you are after
#5 / Feb 25, 2011 5:41am
Hey John,
it works now. And the field I’m searching in is a MultiSelect Custom Field.
Thx,
Michel
#6 / Feb 25, 2011 8:58am
Very glad to hear it. Please post again as needed.