|
|
| |
Home | Contacts | Publish Your Manuals | Remove Your Manuals |
|
| |
|
|
| |
Mergemill: Control tags available to manage looping or multiple branching issues
|
|
| |
|
|
| |
|
Control Tags
CONTROL TAGS : Looping
SYNTAX: |
<!--LOOP--> ... <!--ENDLOOP--> |
EXAMPLE: |
<table width="600" border="0" cellspacing="0" cellpadding="3">
<!--LOOP--><tr align="left" valign="top">
<td width="20"><p><!--[[SeqNo]]--></p></td>
<td width="580"><p><a href="<!--[[ResID]]-->.htm"><!--[[ResName]]--></a></p></td>
</tr>
<!--ENDLOOP--></table> |
REMARKS:
|
* |
The loop tag pair repeats the enclosed part of the template in generating the output file, until all data elements for the field tags in the loop are exhausted, or a loop break condition is met. |
* |
Loops must not be nested. That is, <!--LOOP--> ... <!--LOOP--> ... <!--ENDLOOP--> ... <!--ENDLOOP--> is NOT allowed. |
* |
The number of times the looped part is repeated (i.e. loop size) depends on the field inside the loop that has the greatest number of data elements. Unlike those outside loops, fields that run out of contents before the loop ends will be empty. |
* |
Data elements for any field in a loop for each output file must come from one single source file or source text. |
* |
Each field tag can only appear in one loop within the same template. If you want to use the same contents in another loop, you must name the duplicated fields differently for each loop and point to the same contents in the same source files. In such cases, it is best to export your data WITHOUT the header row, and specify source columns in task settings using column number. |
* |
Fields inside and outside loops must also have different names. |
* |
If a field tag is not in a loop, one data element will be used in each output file for all occurrences of the tag. |
|
CONTROL TAGS : Multiple Branching
SYNTAX: |
<!--STARTCASE--><!--CASE([[Fieldname]]=Check_Text)--> ...
<!--CASE([[Fieldname]]=Check_Text)--> ...
...
<!--CASE()--> ...
<!--ENDCASE--> |
EXAMPLE: |
<!--STARTCASE--><!--CASE([[Month]]=December)--> Winter Events
<!--CASE([[Month]]=January)--> Winter Events
<!--CASE([[Month]]=February)--> Winter Events
...
<!--CASE([[Month]]=August)--> Summer Events
<!--CASE()--> Autumn Events
<!--ENDCASE--> |
REMARKS:
|
* |
Comparison expressions have identical behavior and syntax in both IF and CASE structures. For example, the greater than (>) or less than (<) operator can be used in the comparison expression, and a check range can be specified if the comparison operator is '='. You may also use the modulo operator (%) to find remainder, such as <!--CASE([[Fieldname]]%Number=Remainder)-->. |
* |
Lookup Extension can also be used with CASE structures. Simply replace [[Fieldname]] with [[Lookup_ValueField]]([[Lookup_KeyField]]=[[Fieldname]]). |
* |
After running the first CASE that is true, Mergemill will jump to the ENDCASE tag. |
* |
<!--CASE()--> is the CASE-ELSE tag. This tag is optional in the CASE structure. It is always true and must be the last CASE in the structure. Mergemill will run this case only when none of the preceding CASE comparisons within the same structure returns true. |
* |
CASE structures can be nested. Loops and IF structures can be used within the CASE structure and CASE structures can be used within loops and IFs. |
|
|
|
|
|
 |
Home | Contacts | Publish Your Manuals | Remove Your Manuals |
 |
|