Webtags (preserving history): Difference between revisions

m
Line 124: Line 124:
= Template Files =
= Template Files =


This is the name given by Steve Loft to any files that contain web tags/tokens.
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.
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.  
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 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.
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