Defining a variable in the configuration file
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 replace content in your content file with a general purpose variable, or you need to conditionalize content using variables.
It is possible to replace content in a file with a general purpose variable, or to conditionalize content using variables. The variables need to be defined in the publication's configuration file.
The variables can be of different types:
Variable type |
Variable value |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Block |
One or several block elements, for example a table, include or wrapper element. |
||||||||||||
Boolean |
A boolean value:
|
||||||||||||
Double |
A decimal number. |
||||||||||||
FLEXConfig |
Flexible values depending on the publishing language. In the example below, the value is "456" when publishing to British English (en), "789" when publishing to Swedish (sv) and "123" when publishing to all other languages (default).
|
||||||||||||
Integer |
A whole number (no decimals). |
||||||||||||
Link |
A link element, which is resolved in the content file as the resource ID of the link target file. This variable type is mostly used in stylesheet files. |
||||||||||||
String |
A paragraph element which content shall not be translated. |
||||||||||||
String[] |
An array of strings in separate paragraph elements. This variable type is mostly used in stylesheet files. |
||||||||||||
TranString |
A paragraph element which content shall be translated. |
This instruction tells you how to define variables in a configuration file.
This is an example of content in a configuration file before defining a variable.
This is an example of content in a configuration file after defining a variable.
In the shown images, the XML tags are visible. To show XML tags, see Turning XML element tags on or off.
Open your configuration file, then type the variable's name, type and value in the corresponding columns in the Variables table.
1 - 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 configuration file content opens.
The Variables table is displayed.
If there is no Variables table, you need to create one or copy one from another configuration file.
-
type the variable type,
or
-
start typing and click the arrow to select type from the list.
8. To define another variable, create a new table row and repeat the above procedure from step 4.