The schema tag gives the LocalBusiness data of a store for search engines: the name, address, coordinate and opening hours come from the location and the Opening hours field, the rest from the params. On the page of the store:
On a results page, schema="yes" on the locator or search_result tag adds the results as an ItemList (see the city page above).
Template
{exp:channel:entries channel="stores" limit="1" url_title="{segment_3}" require_entry="yes"}
<h1>{title}</h1>
...
{exp:reinos_maps_locator:schema
entry_id="{entry_id}"
type="BikeStore"
url="{url_title_path='stores/detail'}"
telephone="{store_phone}"
image="{store_photo}"
price_range="€€"
}
{/exp:channel:entries}Build it in your own site
What this example needs in ExpressionEngine, step by step.
- Install Maps Locator and Maps.
- Create the fields, with these short names:
Short name Type Notes store_locationMaps Set the field setting Mode to Single location: one marker per store, placed with the search field. Maps Locator indexes that marker, so this one field is the location for the map and the search. store_hoursMaps Locator Opening Hours The week and the exceptions (holidays). store_phoneText Input store_photoText Input - Create the channel
stores(Stores) and assign the fields. - In the settings of Maps Locator, turn on Reverse geocoding: a marker of a Maps field is saved as a coordinate, the reverse geocoding looks up its address and city (the city pages and a search on a city need them).
- Put the code in a template.
- Add a few stores (the demo site has 34 bike stores in the Netherlands).
This example comes from the Maps Locator docs: the preview runs exactly the code above.