Appearance
Search form tag
Search your location via user form
The tag
{exp:reinos_maps_locator:search_form}
Tag Parameters
Below are the Tag Parameters. Those parameters can be used in the tag described above
search_id
set the search_id hash. This way the module will get this hash instead of using the hash from the url.
search_id=""
metric
set the type of metrics km
or mile
metric="km"
channel
Give the channel(s) to search. separate with a pipeline (|) for multiple channels.
channel=""
location_field
Set the location field name of your input field of your form. This will be used to search against the entries.
location_field=""
radius_field_max
Set the radius max field name of your input field of your form.
radius_field_max=""
search_type_field
Set the search type field, that hold the values. radius
locality
admin_level
sub_locality
search_type_field=""
search_category_field
the category field that holds the categories (names or ID) to select.
search_category_field=""
result_url
set the url of your result page
result_url=""
status
Set the entry status search.
When you want to search for more than one status, use a pipeline |
as separator
status="open"
Tag Variables
Below are the Tag Variables. Those Variables can be used inside the tag described above.
location
the location value
{location}
radius
the radius value
{radius}
search_type
the search_type value
{radius}
search_category:id
The Category id you are searching
{search_category:id}
search_category
If searching multiple categories, this holds a loop of data
{search_category}
{search_category:search_category:id}
{/search_category}
Example
{exp:reinos_maps_locator:search_form
metric="km"
channel="channel_1|channel_2"
location_field="location_field"
radius_field_max="radius_field_max"
search_type_field="search_type_field"
result_url="locations/result"
}
<label>Location to search with (this location will be geocoded</label><br>
<input type="text" name="location_field" value="{location}"/>
<br><br>
<label>Radius (only uses when the search_type is set to 'radius')</label><br>
<select name="radius_field_max">
<option {if radius == 20}selected{/if} value="20">20</option>
<option {if radius == 50}selected{/if} value="50">50</option>
<option {if radius == 100}selected{/if} value="100">100</option>
<option {if radius == 5000}selected{/if} value="5000">5000</option>
</select>
<br><br>
<label>Search type</label><br>
<select name="search_type_field">
<option {if search_type == 'radius'}selected{/if} value="radius">Radius</option>
<option {if search_type == 'locality'}selected{/if} value="locality">Within a City</option>
<option {if search_type == 'admin_level'}selected{/if} value="admin_level">Within a state or province</option>
<option {if search_type == 'sub_locality'}selected{/if} value="sub_locality">Within a city_district</option>
</select>
<br><br>
<input type="submit"/>
{/exp:reinos_maps_locator:search_form}