Changes

Jump to navigation Jump to search

Template Variables

1,007 bytes added, 13:59, 20 August 2020
== Smart Template Variables ==
Smart IF: template variables will compare two values and display a text if the set content only comparison is true and an alternative text if the comparison is false. Colons : are used between the two comparison values and the first text, a pipe | is used between the two texts.Empty text is allowed if you do not want to display anything for a certain condition . [IF=:if this equals:this:display this text|otherwise display this text] [IFIN:if this is met contained:in this:display this text|otherwise display this text] [IFLIKE:if this is like:this:display this text|otherwise display this text] [IF>:if this is greater than:this:display this text|otherwise display this text] [IF>=:if this is greater or not metequal to:this:display this text|otherwise display this text] [IF<:if this is less than:this:display this text|otherwise display this text] [IF<=:if this is less or equal to:this:display this text|otherwise display this text] [IFBETWEEN:if this is between:this:and this:display this text|if it is lower display this text|if it is higher display this text]  You can use IF: variables inside other IF: variables to create complex logic but the internal IF: must be processed before the external IF:They are processed in the following order from left to right so choose an internal one that is different and processed before the external one.i.e. all the [IF=: will be processed first, then all the [IFIN: etc.  [IF=:[IFIN:[IFLIKE:[IF>:[IF>=:[IF<:[IF<=:[IFBETWEEN:
The last element is the text to show based on the result of the IF comparison, texts for the true and false case are separated by a pipe |
Template variables can be used inside this template variable as per the examples.
 
1. [IF=:[GUESTNAME]:Miller:yes|no]
[INWORDS] [INVOICEPAYMENTSNUM] [+] 10 will write out the invoice sum of all payments plus 10
 
 
These template variables are processed in the following order from left to right through the text.
i.e. all the [IF=: will be processed first, then all the [IFIN: etc.
You can use the processing order to construct logic where certain items should be processed before other items.
 
[IF=:
[IFIN:
[IFLIKE:
[IF>:
[IF>=:
[IF<:
[IF<=:
[IFBETWEEN:
== Encoding Template Variables ==

Navigation menu