Webtags (preserving history): Difference between revisions

m
no edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Terminology]]
[[Category:Terminology]]
<div style="background: LemonChiffon;padding:5px; margin:2px;">
[[File:Crystal Clear info.png|40px]] This document was written for the (legacy) Cumulus 1 software.  It has been updated to cover MX, but that was for a MX release that is no longer latest!
<big>From release 3.10.1, web template pages (that need to be processed and uploaded) are no longer provided with MX, instead the default web pages are installed once onto your web server and they use the technique mentioned at [[Php_webtags#Option_3:_JavaScript_Object_Notation|JavaScript_Object_Notation (.json) files]], for full details please see [[New_Default_Web_Site_Information]]</big>
</div>


=What is a web tag? =
=What is a web tag? =


Put simply, a web tag is included in a Cumulus template file to indicate where Cumulus should insert values when it produces an output file. The concept of [[Customised_templates#What_is_meant_by_.27Cumulus_processes_templates.27|processing templates]] is explained in another article.  
Put simply, a web tag is included in a [[Cumulus template file]] to indicate where Cumulus should insert values when it produces an output file. The concept of [[Customised_templates#What_is_meant_by_.27Cumulus_processes_templates.27|processing templates]] is explained in another article.  


The output file can be:
The output file can be:
* a [[Customised_templates#HTML_5_-_a_very_quick_guide_to_structure|web page]],
* a [[Customised_templates#HTML_5_-_a_very_quick_guide_to_structure|web page]],
* a  [[Php_webtags#Option_3:_JavaScript_Object_Notation|JavaScript_Object_Notation (.json) file]]
* a  [[Php_webtags#Option_3:_JavaScript_Object_Notation|JavaScript Object Notation (.json) file]]
* a [[Feels_Like#HTML_code_to_translate_web_tags_to_JavaScript_variables_.28as_modified_for_additional_parameters.29|JavaScript file]],
* a [[Feels_Like#HTML_code_to_translate_web_tags_to_JavaScript_variables_.28as_modified_for_additional_parameters.29|JavaScript file]],
* a [[PHP]] script file, or  
* a [[PHP]] script file, or  
*a [[Xml_webtags|eXtensible Mark-up Language (XML)]] file.
*a [[Xml_webtags|eXtensible Mark-up Language (XML)]] file.


<div style="background: LemonChiffon;padding:5px; margin:2px;">
[[File:Crystal Clear info.png|40px]] This document was written for the (legacy) Cumulus 1 software.  It has been updated to cover MX, but that was for a MX release that is no longer latest!
<big>From release 3.10.1, web template pages (that need to be processed and uploaded) are no longer provided with MX, instead the default web pages are installed once onto your web server and they use the technique mentioned at [[Php_webtags#Option_3:_JavaScript_Object_Notation|JavaScript_Object_Notation (.json) files]], for full details please see [[New_Default_Web_Site_Information]]</big>
</div>
{{TOCright}}


== Why does MX talk about tokens? ==
== Why does MX talk about tokens? ==
Line 47: Line 43:
=What this article covers =
=What this article covers =


{{TOCright}}
#At the last count, a 3.5.x version of MX produces ''nine and a half million'' '''web tags'''!   
#At the last count, a 3.5.x version of MX produces ''nine and a half million'' '''web tags'''!   
# Those millions of web tags can actually produce billions of different outputs!
# Those millions of web tags can actually produce billions of different outputs!
Line 76: Line 73:
There is some more information on [[Webtag Applicability|Web tag Applicability page]].
There is some more information on [[Webtag Applicability|Web tag Applicability page]].


= Template Files =
This is the name given by Steve Loft to any files that contain web tags and need to be processed before they actually include values.
When Cumulus processes these files it generates output files where the tags/tokens have been replaced by values. Consequently, a single template will actually generate a different file each time Cumulus processes that template because the part of the content that was web tags is now populated with text (values, times, dates, etc.) and as these values change that make the file different to the previous generated file.
For standard Cumulus, all the output files are web pages which it then uploads to your web site. There is more about processing of files on the [[Customised templates]] page, but think of a template as containing text that Cumulus copies from the template file to the web page it is constructing. The processing process is basically a parse, each time it finds what MX calls a token (a web tag complete with any parameters it needs) it looks up the value that it will use to replace that web tag before moving on through the text.
The example web templates provided by Cumulus insert a "T" at the end of the intended web page name before the extension (.htm or .html), so that the template files and generated web pages cannot be confused. The generated file will often have "tmp" added to the end
When writing your own templates, some people will stick to this "T" notation, others will change the extension to "tmpl" or "cum" to indicate they are Cumulus templates. Cumulus does not care what extension is used for any local file specified in the MX '''Extra Web Files''' settings or Cumulus 1 '''Files''' tab settings.
For Cumulus 1 and MX, there are one template held within the program code, this is what produces the default [[Realtime.txt]]. You can define an alternative template with web tags and Cumulus can process that instead of its default template.
For MX only, there are other templates held within the program code (so you cannot edit them), these output in json format. Some are application program interface, and feed information to the admin interface, you can only view these by using the development interface in your browser that lets you see what has been loaded. The rest become the json files that are created in the '''web''' folder from where (like the web pages produced after processing the standard web templates), they can be uploaded to your web site.


= Web tags available in Cumulus =
= Web tags available in Cumulus =
5,838

edits