Within a spooled file you may have so different formats of the pages, so that you would prefer to switch between different templates or just different layouts/designs through a spooled file.
(This is the function labeled as overlay selector in InterForm400).
You can get a long way with conditions both the if element and the select element in the designer and you can even use translation files to build a multi-language template (where you insert translation texts instead of fixed texts in a specific language) and in that way eliminate the use of switching between different templates/layouts/designs.
If you however do require to switch between different formats, then you can do it like indicated below:
In order to set this up you first need to load a sample spooled file in the designer, so that the designer knows, that the input is a spooled file.
Then you can insert the repeat element and here refer to the page element like described in the section, Map spooled file from current page.
In the conditions above you can refer to the spooled file contents by simply clicking on the magnifying glass icon:
and then (with the mouse) drag around the spooled file data, that you want to compare with to place the blue box marker:
Please notice, that the page selection on the top left is 'Auto', which tells InterFormNG2, that you are comparing with data from the current page of the spooled file (referring to the page repeat).
In the example above I have used components to encapsulate the elements for a specific design - which makes it e.g. possible to reuse the component in another template or another place in the same template, but you do not need to define components.
In the example above all the components share the same page element, so with the setup above all pages will have the same size and rotation, but if you even want the page size or rotation to depend on the current page, then you can implement your template like below:
Here each Page element has its own settings. In the example above the text in line 6, position 8 to 9 indicates which page size to use. You can even make it more advanced/dynamic as the page size can be set via an Xpath expression.