Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Website webtags

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
Pirate3000
Posts: 36
Joined: Fri 29 Jan 2021 3:56 pm
Weather Station: Ecowitt Wittboy + Extra Sensors
Operating System: Windows 10
Contact:

Website webtags

Post by Pirate3000 »

Hi all
There is going to be a simple answer for this question.
I'm trying to get a new weather website updated ready for the new weather station going into place when the workshop is all finished.
I'm using the latest cumulus mx and have noticed that the tags have changed in the index.htm.

Example
old: - #sunrise - Sunrise

New: cmxdata="sunrise - Sunrise

do you have to use the new format or still the old one.
Thanks for help as always... :D
Anything's possible with the weather.

https://www.hytheweather.co.uk
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: Website webtags

Post by ConligWX »

the new format of webpages does not use webtags as such. it uses the /websitedata.json file. unless you are using the old legacy webpages

more info here: https://cumuluswiki.org/a/New_Default_W ... nformation
User avatar
meteo19
Posts: 89
Joined: Tue 03 May 2016 8:13 pm
Weather Station: Davis VP2+/DP1500 SmartHub
Operating System: Microsoft Windows 7 Pro
Location: Ségur-Le-Château, France

Re: Webtags site

Post by meteo19 »

Hello

New CumulusMX template install the problem I'm encountering is for webtags that incorporate an example image newrecord . Until now I was making a call.

<img src"images/Record<#newrecord>.gif"alt"O" width-"14" title"Led flashing new record-click to see the records "align"absmiddle" >

But now or place the <span data-cmxdata"newrecord"></span> to get image. I integrate newrecord into websitedataT.json.

Thanks for ideas :?: :groan:

Patrick

http://www.meteosegur.fr/CumulusMX/index.htm
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Website webtags

Post by mcrossley »

You will have to add the <#newrecord> tag intp your websitedataT.json file, then add some custom JavaScript to set the <img> src filename.

Something like...

Code: Select all

<img id="newRecord" src="" alt="O" .....>
Then...

Code: Select all

$(document).ready(function() {
	dataLoadedPromise.then(function() {
		$('#newRecord').attr('src', 'images/Record' + cmx_data.newRecord + '.gif');
	});
});
With the JS code being called on the data load Promise fulfilment like the menu.js code.

** All code untested **
User avatar
meteo19
Posts: 89
Joined: Tue 03 May 2016 8:13 pm
Weather Station: Davis VP2+/DP1500 SmartHub
Operating System: Microsoft Windows 7 Pro
Location: Ségur-Le-Château, France

Re: Website webtags

Post by meteo19 »

Thanks Mark it works bravO to you. I had no more ideas. :clap: :clap:
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Website webtags

Post by mcrossley »

:thumbsup:
Post Reply