Appearance
schema tag
The schema.org LocalBusiness data of a location as JSON-LD, for search engines (the business details in Google). (from v4.0.0)
{exp:channel:entries channel="stores" limit="1" url_title="{segment_3}" require_entry="yes"}
{exp:reinos_maps_locator:schema
entry_id="{entry_id}"
type="BikeStore"
url="{url_title_path='stores/detail'}"
telephone="{store_phone}"
image="{store_photo}"
}
{/exp:channel:entries}The tag outputs a <script type="application/ld+json"> with:
- the name (the title of the entry), the address as a
PostalAddressand the coordinate asGeoCoordinates, from the location of the entry; - the opening hours as
openingHoursSpecification, from the first Opening hours field of the entry, with the exceptions from today on; - the properties of the params below.
Empty values are left out. The output is safe: HTML in a param is removed, and the values can't end the script or be parsed as a template.
For a list of locations, use schema="yes" on the locator or search_result tag: an ItemList of the locations.
Parameters
entry_id
The entry of the location (on the current site). Required: without a location of the entry the tag outputs nothing. An entry with more locations uses the first one with a coordinate.
entry_id="{entry_id}"type
The schema.org type, e.g. Store, BikeStore, Restaurant or AutoDealer: one word of letters that starts with a capital, any other value uses the default. Default LocalBusiness.
type="Store" [OPTIONAL]name
The name. Default the title of the entry.
name="{title} Utrecht" [OPTIONAL]url
The URL of the page of the location.
url="{url_title_path='stores/detail'}" [OPTIONAL]telephone, email
The phone number (preferably with the country code, +31 30 123 45 67) and the email address.
telephone="{store_phone}" email="{store_email}" [OPTIONAL]image
The URL of a photo of the location.
image="{store_photo}" [OPTIONAL]description
A short description, without HTML.
description="{store_intro}" [OPTIONAL]price_range
The price range, e.g. €€.
price_range="€€" [OPTIONAL]same_as
The URLs of the location on other sites (social media, review sites), separated by a pipe.
same_as="https://www.facebook.com/example|https://www.instagram.com/example" [OPTIONAL]Output
json
{
"@context": "https://schema.org",
"@type": "BikeStore",
"name": "Bike Center Utrecht",
"url": "https://www.example.com/stores/detail/bike-center-utrecht",
"telephone": "+31 30 123 45 67",
"address": {
"@type": "PostalAddress",
"streetAddress": "Oudegracht 158",
"postalCode": "3511 AZ",
"addressLocality": "Utrecht",
"addressCountry": "NL"
},
"geo": { "@type": "GeoCoordinates", "latitude": 52.0907, "longitude": 5.1214 },
"openingHoursSpecification": [
{ "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Friday"], "opens": "09:00", "closes": "18:00" },
{ "@type": "OpeningHoursSpecification", "validFrom": "2026-12-25", "validThrough": "2026-12-25", "opens": "00:00", "closes": "00:00" }
]
}Check the result with the Rich Results Test of Google.
