Page 1 of 1

New Webtags

Posted: Mon 26 Jul 2021 1:43 pm
by Pirate3000
Hi all.
Is there a list of the New webtags that Cumulus uses?
as i have noticed that all the new one seem to start cmx-***** and im trying to add some custom tags to the website. :(
so can you still use the old ones with some mods, or new ones only. :bash:

Thanks for any help

Re: New Webtags

Posted: Mon 26 Jul 2021 4:04 pm
by Gyvate
Are you talking of
https://cumuluswiki.org/a/Webtags
or something else ?

Re: New Webtags

Posted: Mon 26 Jul 2021 5:42 pm
by sfws
Pirate3000 wrote: Mon 26 Jul 2021 1:43 pmIs there a list of the New webtags that Cumulus uses?
as i have noticed that all the new one seem to start cmx-***** and i'm trying to add some custom tags to the website.
Yes, there is a list.
To see those "cmx-", you should go direct to https://cumuluswiki.org/a/WebsitedataT.json. (There is a link to this page in the MX column on the Main Page of the Wiki, and a link to it at the top of the page referenced in the previous answer)

Just be aware, that the file contents do slightly vary between releases, so check the actual file in your installation against the documentation.

Pirate3000 wrote: Mon 26 Jul 2021 1:43 pm so can you still use the old ones with some mods
Yes. Tag names in the link in previous answer, could be added to the above json template file, and added to the web page, if you understand the way it now works from the introduction at the top of the page I refer to above, where there is also advice about the best practice for modifying the json file.
Perhaps when you succeed, you can think about adding your experience because there is not yet an example in the Wiki?

Re: New Webtags

Posted: Sat 14 Aug 2021 8:30 am
by Pirate3000
Hi
I have been revisiting this page of mine to try and get working only to find that the old tags #ProgramUpTime are not in the new templates.
I have tried to use
<p><strong>Program Up Time
</strong> <span data-cmxdata="programUpTime"></span></p>
and this wont work.
Does it work still or do i have to add this to the Json file to get this to work as the wiki does not include these old webtags anymore.

Thanks in advance.

Re: New Webtags

Posted: Mon 16 Aug 2021 10:15 am
by mcrossley
Pirate3000 wrote: Mon 26 Jul 2021 1:43 pm as i have noticed that all the new one seem to start cmx-***** and im trying to add some custom tags to the website. :(
so can you still use the old ones with some mods, or new ones only. :bash:
None of the MX web tags have a "cmx-" prefix. You are confusing the attributes that the new web site uses to write data to page with the web tags that supply the data.

The web tags are the same as they always were.

The old web site used the web tags directly embedded into each page. That meant the Cumulus had to process every page and upload a new copy of each page every update interval.

The new web site uses pages that have markers in them where the data is to go - the <span "data-cmxdata=xxxx"></span> value - and a data file that contains the - well - data!

That data file is in JSON format, it has property names that match the attributes in web pages - the "xxxx" in "data-cmxdata=xxxx", and the value in the template file is supplied by the good old fashioned web tag.
Now Cumulus just has to process that JSON template file, and upload the resulting data file to the web site and all the web pages can read it to extract the bits of data they need.

That means to add your up time, you need to...
1. Add a property the JSON template file of say:-

Code: Select all

"programUpTime":"<#ProgramUpTime>",
2. On you web page add in a span where you want the uptime to appear like:-

Code: Select all

<span data-cmxdata="programUpTime"></span>