Show data that changes outside the site, such as opening hours, prices or a status, in blocks of your pages; send newsletter sign-ups from the server; and give map blocks their coordinates.
For site owners and developers · any Pro plan · Administrator · Checked with Leitvia 1.2.69, Leitvia Studio 1.3.65 and Leitvia Pro 0.8.55
Data in a page
Transcript of the video
- Under Pro, tab Data sources, content types and products are sources by themselves.
- In a page, add the block Data list from the inserter.
- Choose the source and the fields; the list renders on the server with the time of the data.
Data sources
A data source is a list of records, such as your branches with their opening hours. Three kinds exist:
| Kind | ID | Content |
|---|---|---|
| Remote | Your choice, such as branches | A JSON or CSV file from an HTTPS address |
| Content model | model/<post type> | Published entries of a content type with title, address and every field |
| WooCommerce | products | Published products with name, address, prices, SKU, stock and rating |
Content model and WooCommerce sources appear by themselves. A remote source you add like this:
- Open Leitvia Studio › Pro, tab Data sources.
- Under Add a source, enter an ID (lowercase letters, digits, hyphens), a Name and the Address of the file. It starts with
https://. - Choose the Format, JSON or CSV.
- For JSON, fill Path to the list only when the list sits deeper in the file (see the example below).
- Set the Refresh interval in minutes, from 1 to 1440. The default is 15.
- Choose Save and fetch. The table above the form then shows the number of records and the time of the fetch.
In this file the list sits under data, then items, so the path is data.items. A nested object becomes a field with a dot, here address.city:
{
"data": {
"items": [
{ "name": "Hamburg harbour", "open": "8 to 18", "address": { "city": "Hamburg" } },
{ "name": "Bremen centre", "open": "9 to 17", "address": { "city": "Bremen" } }
]
}
}


Show the data
- Data list: the records of a source as a table or a list. Add the block, choose the source and the fields.
- Data map: records with coordinates on a map. Map tiles load only after the visitor agrees.
- The block binding Live data: one field of one record in a paragraph, heading, image or button. An AI agent usually sets it for you.

Markup of the binding Live data
The source is leitvia-pro/data. match picks the first record whose field has that value, row picks one by its position (0 for the first). The field _updated gives the time of the data.
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"leitvia-pro/data","args":{"source":"branches","field":"open","match":"name=Hamburg harbour"}}}}} -->
<p>Opening hours follow.</p>
<!-- /wp:paragraph -->
The blocks show when the data was fetched, so visitors see how old it is. Content model sources hold published entries only. Sample entries of a kit are drafts until you publish them, and until then the list says No data is available right now.
Limits and safety
- Only
https://on the standard port, a public host and no redirect. - At most 1 MB, 500 records and 1000 characters per value. A fetch waits 5 seconds at most.
- If a refresh fails, the last good records stay in use for up to a week, with their old time.
- Your server fetches the data. The browser of a visitor never talks to the host of a source. Use public data only: everything a source holds can show on the site.
Newsletter
The block Newsletter sign-up sends addresses to the service you choose. Set it up like this:
- Open Forms and customers, tab Newsletter.
- Under Service, choose Newsletter (WordPress plugin), Klaviyo, Mailchimp or Brevo.
- For Klaviyo, Mailchimp or Brevo, enter the API key and the List ID. Brevo also needs the number of its Double opt-in template. The WordPress plugin needs neither.
- Choose Save Changes, then add the block Newsletter sign-up to a page.
With Newsletter (WordPress plugin), the plugin Newsletter on your site keeps the addresses and sends the confirmation email. With an external service, your server sends each address, so visitors never connect to the service. Then you need an agreement on data processing with it, and double opt-in turned on for the list.

Coordinates
A Data map needs latitude and longitude for each entry. Pro fills them from the address:
- Open Leitvia Studio › Pro, tab Coordinates.
- Choose the service: Nominatim (OpenStreetMap, no key) or Geoapify (EU, with API key).
- Under Fields per content type, pick the fields for address, latitude and longitude. Choose None to leave a type out.
- Choose Save Changes. From now on, saving an entry in the editor with an address and empty coordinates fills them in.
Only the address and the language of the site go to the service, never anything about visitors. AI agents use the ability Look up coordinates (leitvia-pro/geocode), which writes into a change package.

Read next: Install Leitvia Pro, Kits and building blocks and Move content from a page builder.