Skip to main content
Skip table of contents

Iterators

Iterators are a core concept for printing lists of items. There are different types but at the top level you will use two of them: Children of Folder and Links of Item. The iterators themselves will work a bit differently depending on the input and to get the recursion effect you have to put a “recursive” function into either the folder or item output. The core idea is that the iterated formatter, for example a LIST, is run against all the sub items again when it encounters a “recursive” function in the output.

Children of Folder

Use this when you want to iterate over a whole folder structure, with a selection of a folder or a combination of folders and items. For this to be effective you will normally have a “recursive” function in the Folder output of the List. As an example see the Simple Bullet List formatter in the default templates.

Links of Item

The link iterator is a bit more complicated to use in terms of formatting since the recursion treats the top item and the recursion item the same way, unlike the children iterator where a folder has its own formatting template.

For a simple example see the “Iterate Links” LIST, it will create a recursive bulleted list of downlinks from all selected items. As you can see the formatting looks the same for each.

A more typical example is to combine a regular item list with a FORMAT and an additional LIST purely for the iteration, without recursion. An example for this is the “List of Items” LIST. It uses a children iterator to list all items, a formatter to extract the links (“Downlinks with Condition and Error and Label”) which in turn uses “Downlinks” to render the item’s downlinks.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.