Cumulus template file: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 12: Line 12:
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, a newly generated file is different to the previous generated file.
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, a newly generated file is different to the previous generated file.


==General Format for Web Tags==


==Template files you add==
In the position on the page you wish Cumulus to insert the relevant data place a web tag in the '''general format''' specified here:  <pre><#tag_name [optional input parameters][optional output parameters]></pre>


The page dealing with the customisation of web templates is [[Customised templates]], and it includes a diagram that explains how file names are affected by your choices in some of the settings for file transfer.
==== Case sensitivity ====


People writing their own templates can use any file extension (some popular choices are "tmpl" or "cum" to indicate they are Cumulus templates). To ensure that the template files and generated web pages cannot be confused, Steve Loft realised the "T" notation used by the provided templates may not be part of the name you choose, hence the generated file will have "tmp" added to the end of the template name you selected, just to remind you of its temporary existance until the source template is processed again.  That "tmp" is removed when the final web page is stored on your web server.
The tag_name in the general format above is case sensitive, so please type the tag name exactly as shown in the web tag columns in the tables on the [Webtags|web tags page]].


=== Using web tags in templates for creating HTML pages ===
The optional input parameters always use lower case, so please type them exactly as shown in the sections dealing with input parameters on that page.


You can include special markers in your template file that are called web tags; during processing Cumulus will replace them with the actual values.
The optional output parameters are case insensitive when used in Cumulus 1. But for Cumulus 2 and later, so this includes MX, the output parameters are case sensitive and also dependent on what other output formatters are being used if any, so please read the sections on output parameters and study the examples in the tables carefully.


Typically you would use this to build your own website by having an HTML template file with your layout, static text and graphics.  In the position on the page you wish Cumulus to insert the relevant data place a web tag in the general format specified here:  <pre><#tag_name [optional input parameters][optional output parameters]></pre>


''Note: When you put a tag into your template, be careful that whatever program you are using to develop your web pages doesn't change the angle brackets to slightly different symbols -- this is a common cause of failure!''  There are a number of editing tools that are '''designed for editing programming code''' and you should use one of those (e.g. Notepad++, Brackets, NoteTab Light, HTML kit, amongst many others), ''rather than a tool designed for web page design editing'' (e.g. Dreamweaver, word press, amongst others).
=Template files you add=


The page dealing with the customisation of web templates is [[Customised templates]], and it includes a diagram that explains how file names are affected by your choices in some of the settings for file transfer.


People writing their own templates can use any file extension (some popular choices are "tmpl" or "cum" to indicate they are Cumulus templates). To ensure that the template files and generated web pages cannot be confused, Steve Loft realised the "T" notation used by the provided templates may not be part of the name you choose, hence the generated file will have "tmp" added to the end of the template name you selected, just to remind you of its temporary existance until the source template is processed again.  That "tmp" is removed when the final web page is stored on your web server.


==== Case sensitivity ====
''Note: When you put a tag into your template, be careful that whatever program you are using to develop your web pages doesn't change the angle brackets to slightly different symbols -- this is a common cause of failure!''  There are a number of editing tools that are '''designed for editing programming code''' and you should use one of those (e.g. Notepad++, Brackets, NoteTab Light, HTML kit, amongst many others), ''rather than a tool designed for web page design editing'' (e.g. Dreamweaver, word press, amongst others).


The tag_name in the general format above is case sensitive, so please type the tag name exactly as shown in the web tag columns in the tables on the [Webtags|web tags page]].
=== Using web tags in templates for creating HTML pages ===


The optional input parameters always use lower case, so please type them exactly as shown in the sections dealing with input parameters on that page.
You can include special markers in your template file that are called web tags; during processing Cumulus will replace them with the actual values.


The optional output parameters are case insensitive when used in Cumulus 1. But for Cumulus 2 and later, so this includes MX, the output parameters are case sensitive and also dependent on what other output formatters are being used if any, so please read the sections on output parameters and study the examples in the tables carefully.
Typically you would use this to build your own website by having an HTML template file with your layout, static text and graphics.


=== Using web tags in scripts ===
=== Using web tags in scripts ===
5,838

edits