Thorium Builder does not implement a JSON File editor, we consider here that you have a valid JSON file available.For our example, we use a JSON file with the following structure:
As you can see, the records are within a “records” array and contain 5 fields, including an image url.
This example file can be download here: Download JSON Exemple
Since the 1.5.0 version, the Json API plugin can handle nested JSON structures, but if you are using an older version, the plugin wasn't handle JSON structures with more than one level, the record list had to be be placed at the root level (with a record root name or not) like in our example (items=>index, items=>name, etc…)
In order to use this JSON file with a
, follow the instructions below:
: create a page for your project and drop a
on the page:
: double click on the
JSON API Repeater
By double-clicking, you can access to the advanced properties.Select the “Local Json file” for "Source Type"
: Click on the “+” Button, then select the JSON File you wish to add to the project.
When the JSON file is loaded, set the “Root” records name in the “Root” input.For our exemple, the root name is “items”. For some JSON files, the structure may not have a root group, in that case let this field empty.
Click on the “Save” button, and the on the “Select” button in order to link this new Data Source to the JSON Repeater.
: define the fields you want to display in the list as described in the screenshot below:
The Image Root fields lets you specify the root access to images if there are located on another server. For instance, The “image” field can contain only the filename, and the “Image Root” contains then the full prefix url when required (eg. https://myserver/mypath/)