A file loop is a template file construct which allows you to iterate through the collection of files that are assigned to the structure which is currently being processed.
File loops are delimited by a matching pair of <FILE_LOOP> and </FILE_LOOP> tags that surround the template code to be inserted for each file. The code between the opening and closing tags of a file loop is repeated for each file assigned to the structure being processed.
File loop tokens are tokens that can only be used within a file loop:
There are two types of file loops, called multi-line file loops, and in-line file loops.
Multi-Line File Loops
Multi-line file loops occur when the opening and closing file loop tags appear on separate lines in a template file, and delimit one or more entire lines of template code, like this:
Multi-line file loops generate one or more lines of output code for each file that is processed.
In-Line File Loops
In-line file loops exist when the opening and closing file loop tags appear on the same line in a template file, and delimit part of a line of template code, like this:
[code] <FILE_LOOP> code </FILE_LOOP> [code]
In-line file loops generate code into the current output line.
Copyright © 2018 Synergex International, Inc.