WebsitedataT.json: Difference between revisions

205 bytes added ,  14:36, 21 October 2021
m
m (→‎How the file is used: Made clearer)
Line 30: Line 30:
For example <code>&lt;span data-cmxdata="recordsbegandateISO"&gt;&lt;/span&gt;</code> would instruct the "setpagedata.js" script to insert the date in the JSON line that we examined in detail at the start of this Wiki page, and <code>&lt;span data-cmxdata="temperatureChange24hours"&gt;&lt;/span&gt;</code> would make it insert the temperature difference we used to show how arithmetic can be used in what we presented earlier as an example of what can be added as a modification to the JSON template.
For example <code>&lt;span data-cmxdata="recordsbegandateISO"&gt;&lt;/span&gt;</code> would instruct the "setpagedata.js" script to insert the date in the JSON line that we examined in detail at the start of this Wiki page, and <code>&lt;span data-cmxdata="temperatureChange24hours"&gt;&lt;/span&gt;</code> would make it insert the temperature difference we used to show how arithmetic can be used in what we presented earlier as an example of what can be added as a modification to the JSON template.


In the tables below, that explain the data represented by various lines in the template file, the Cumulus [[webtags|tag name]] and its meaning are explained, it is made clear whether any [[Webtags/Parameters|input/output modification parameter]] appears, and the table clearly identifies what JSON object name is used for the span attribute value. It might seem there is some repetition, but the tag name and JSON object name do not always match. Please note for simplicity, not every line in the file is explained, sometimes just one example is given representing multiple lines, this is enough to show you the format (with or without parameters), and whether the tag name and JSON object name do match.
In the tables below, that explain the data represented by various lines in the template file, there are multiple columns:
* Cumulus tag name (including whether any input/output modification parameters)
* JSON object variable name
* The span sequence used in HTML file to relate to the
The reason for showing all three columns is that sometimes the tag name and the variable name do not match in the JSON file, and that if you look in the HTML file you need to find what data will be inserted there, including whether any [[Webtags/Parameters|input/output modification parameter]] appears, or the default output from that tag name will appear. Please note for simplicity, not every line in the file is explained, sometimes just one example is given representing multiple lines, this is enough to show you the format (with or without parameters), and whether the tag name and JSON object variable name do match.


=File details=
=File details=
5,838

edits