In a node’s content field, you can add conditional text that only displays when certain conditions are met. The conditions can be configured using the rule builder.
The conditional text can be inserted inline within the content or presented as a separate text block. Additionally, conditional content can contain images, videos, and other elements, similar to how you format the regular content field itself.
Conditional – inline
To make a part of your content conditional, follow these steps:
- Select the area you want to make conditional
- Click + Insert in the top right of the CONTENT field
- Select Conditional – inline.
- Enter a title for the conditional area. This title will be displayed to authors only.
- Click on the gear icon to configure the condition and determine when the selected area will be displayed to end users.
- To close the Conditional – inline dialog, click on any area of the content field that is not part of the conditional section.
To remove the condition from the conditional area, click on it, and in the panel that appears, click the trash icon. This will remove the condition, and the area will display unconditionally.
Conditional – block
You can also choose to display a whole block conditionally in a node's content field. However, we generally recommend using updated Text Block values instead, as they make the underlying logic explicit in the module graph (see here for a more detailed description). If you still want to use conditional blocks, follow these steps:
- Click + Insert in the top right of the CONTENT field.
- Select Conditional – block.
- Enter your content into the block.
- Click on the gear icon to configure the condition and determine when the block’s content will be displayed to end users.
To delete a conditional block, click the trash icon on its border. This will delete the whole block including its content.