New Default Web Site Information: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
(3 intermediate revisions by the same user not shown)
Line 159: Line 159:


=== Adding Data from the websitedata.json File ===
=== Adding Data from the websitedata.json File ===
If you wish to insert data from the websitedata.json file, then all you need to do is add a <nowiki><span></nowiki> element with the "data-cmxdata" attribute set to the data item you wish to display.
 
If you wish to insert data from the [[WebsitedataT.json|websitedata.json]] file, then all you need to do is add a <nowiki><span></nowiki> element with the "data-cmxdata" attribute set to the data item you wish to display.


For example to add the current temperature and unit to your page, you would add the following spans...
For example to add the current temperature and unit to your page, you would add the following spans...
Line 170: Line 171:
== FAQ ==
== FAQ ==
==== I want to keep the old web site look and feel, but also update to MX v3.10+ ====
==== I want to keep the old web site look and feel, but also update to MX v3.10+ ====
Well, good news (for now). The distribution zip file contains a folder named /webfiles-legacy.
 
Well, good news (for now). The distribution zip file contains a folder named <code>/webfiles-legacy</code>.
 
This folder contains a "new" version of the original web site that uses the same data-driven approach of the new template. So you can enjoy the efficiency of the new single data file upload with the old look and feel.
This folder contains a "new" version of the original web site that uses the same data-driven approach of the new template. So you can enjoy the efficiency of the new single data file upload with the old look and feel.
Be aware though that these legacy files will no longer be maintained or updated, and at some stage will be removed from the distribution file.
Be aware though that these legacy files will no longer be maintained or updated, and at some stage will be removed from the distribution file.


==== I want to keep the old web site completely, but also update to MX v3.10+ ====
==== I want to keep the old web site completely, but also update to MX v3.10+ ====
It that case you will have to keep the indexT.htm, gaugesT.htm etc. files from a previous release and make sure they are still in your local /web folder.
It that case you will have to keep the ''indexT.htm'', ''gaugesT.htm'', etc. files from a previous release, and make sure they are still in your local /web folder.


Then you will have to add every web page template file (indexT.htm, gaugesT.htm etc) to your Cumulus MX Extra Files list; the remote filenames should all drop the 'T' - indexT.htm becomes index.htm. Ensure you tick process, FTP and add your web site FTP folder in remote files.
Then you will have to add every web page template file (indexT.htm, gaugesT.htm etc) to your Cumulus MX [[MX_Administrative_Interface#Extra_Web_Files|Extra Files]] list; the remote filenames should all drop the 'T' - indexT.htm becomes index.htm. Ensure you tick '''process''', ''FTP'' and add '''your web site FTP folder''' in remote files.


==== I want to customise/localise the data Cumulus MX uploads in the JSON data file ====


==== I want to customise/localise the data Cumulus MX uploads in the JSON data file ====
The uploaded data file is created from a [[Cumulus_template_file|template]] file called [[WebsitedataT.json|/web/websitedataT.json]] using web tags.
The uploaded data file is created from a template file /web/websitedataT.json using web tags.


You can create a copy of this file and customise the tags as you wish.
It is ''not recommended'' to edit supplied <code>/web/websitedataT.json</code> file directly, you risk losing any changes you make with every update.


Then add your new template JSON file to the Cumulus Extra Files list, with process and FTP enabled, for the remote filename use the default websitedata.json so that the template scripts will pick it up without alteration.
You can create a copy of this file, in a new folder with a slightly modified file-name, and customise the tags as you wish.


You also need to change the Internet Settings/Interval file list to not process or upload the standard websitedata.json file.
Then add the path to your new template JSON file to the Cumulus [[MX_Administrative_Interface#Extra_Web_Files|Extra Files]] list, with process and FTP enabled, for the remote filename use the default '''websitedata.json''' (so that the template scripts will pick it up without alteration).


It is not recommended to edit supplied /web/websitedataT.json file directly, you risk losing any changes you make with every update.
You also need to change the '''Internet Settings > Interval''' file list to not process, nor upload, the standard ''websitedata.json'' file.


==== I want to change the colour theme ====
==== I want to change the colour theme ====
5,838

edits

Navigation menu