Reinos.nl internet media examples

schema.org data of a store

Maps Locator 4.0.1 Code only

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.

  1. Install Maps Locator and Maps.
  2. Create the fields, with these short names:
    Short nameTypeNotes
    store_locationMapsSet 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 HoursThe week and the exceptions (holidays).
    store_phoneText Input
    store_photoText Input
  3. Create the channel stores (Stores) and assign the fields.
  4. 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).
  5. Put the code in a template.
  6. 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.