Conditionalizing several block elements
The procedure in this topic assumes Skribenta is installed and configured for normal operation, and:
-
You have logged into Skribenta.
-
You are assigned to one of the following user roles: content provider, technical writer or administrator.
-
You have selected the workspace you want to work in.
-
A content file or a configuration file is created in the workspace.
-
You have browsed to and opened the file in the Workspace view or the Publications view.
You need to conditionalize several adjacent block elements, to be able to use the same content file for multiple publications.
It is possible to conditionalize several adjacent block elements together by wrapping them in an if-wrapper.
By using a variable in the condition, the condition can be evaluated differently depending on the variable value defined in the publication's configuration file. You can then use the same content file in multiple publications, and let the variable value control the published output.
This instruction tells you how to conditionalize several adjacent block elements together.
This is the file content before conditionalizing two adjacent paragraph elements.
This is the file content before conditionalizing two adjacent paragraph elements.
In the shown images, the XML tags are visible. To show XML tags, see Turning XML element tags on or off.
Select adjacent block elements, then click Block > Wrapper > If on the top toolbar. Type the condition inside the created If wrapper title element.
5 minutes
Procedure
In the shown images, the XML tags are visible. To show XML tags, see Turning XML element tags on or off.
1. Make sure that the step(s) in section "Starting point" (see section "Background" above) are performed.
The Wrapper list opens.
A wrapper element with class if, and a title element are created.
In this example the condition is a boolean variable.
All content in the If wrapper element is now conditionalized.
-
Publish the publication
or
-
Evaluate the condition directly in the content file, see .