Conditional rules allow you to control whether a block of slides is generated based on the information available in your project.
They are particularly useful for complex templates containing many variables and blocks that are not required for every project. By preventing unnecessary blocks from being generated, conditional rules can reduce the number of slides processed and help optimize document generation time.
💡 You do not need conditional rules for every block. They are most useful in complex templates where some blocks should only be generated for certain projects.
1. How do conditional rules work?
A conditional rule checks whether a specific variable exists before generating the block.
For example, imagine you have a block containing accommodation information for Day 3.
You can use:
$$days.3.accom.1$$
The block will only be generated if the first accommodation for Day 3 exists.
If the project does not contain that accommodation, Ezus does not generate the block.
This is useful when your template contains blocks designed for information that may not be present in every project.
2. Require several variables to exist
You can make the generation of a block depend on several variables.
Separate the variables with a comma:
$$days.1$$,$$days.2$$
In this example, both Day 1 and Day 2 must exist for the block to be generated.
If either of them does not exist, the block is not generated.
💡 A comma works as an AND condition: all the variables included in the rule must exist for the block to be generated.
Example
Imagine you have designed a block that only makes sense when a project includes both Day 1 and Day 2.
Use:
$$days.1$$,$$days.2$$
The result will be:
Project information | Block generated? |
Day 1 exists + Day 2 exists | Yes |
Day 1 exists + Day 2 does not exist | No |
Day 1 does not exist + Day 2 exists | No |
3. Generate a block when information does not exist
You can also create the opposite condition: generate a block only when specific information does not exist.
Add ! before the information you want to negate.
For example:
$$!days.1.accom.1$$
This means that the block is generated when the first accommodation for Day 1 does not exist.
This can be useful when you have an alternative block that should only appear when particular information is absent.
💡 Think of ! as “does not exist.”
4. Which variables can I use?
Conditional generation rules support specific variables.
General variables
Information | Syntax |
Alternatives |
|
Payments |
|
Suppliers |
|
Program variables
Information | Syntax |
Accommodations |
|
Transport |
|
Steps |
|
Days |
|
Replace N with the number of the item you want to check.
For example:
$$days.3$$
checks whether Day 3 exists.
$$accom.2$$
checks whether the second accommodation exists.
5. Check information within program items
Conditional rules can also check specific information associated with activities, accommodations, and transport.
Supported structures include:
...images.N$$
to check for an image, and:
...product.N$$
to check for a product.
For example, you can use a condition based on whether a particular program item contains the required image or product before generating its block.
You can also use the [category] syntax for activities, using the technical name of the category.
⚠️ When using [category], use the technical name of the category, not necessarily the name displayed to users.
6. Check whether a supplier has a product
You can also make the generation of a block depend on a product associated with a specific supplier.
Use:
$$supplier.N.product.N$$
For example, a block can be configured so that it is generated only if a particular product from the selected supplier exists.
If that product does not exist for the supplier, the block is not generated.
7. Add a conditional rule to a block
To configure a conditional rule:
Open the Slides template you want to edit.
Select the block whose generation you want to control.
Open Conditional rule to generate the block.
Enter the variable that should determine whether the block is generated.
If several variables must exist, separate them with a comma.
If the block should be generated when information does not exist, add
!to the condition.Save your changes.
Generate the document with a representative project to test the result.


