rougail-output-doc/tests/docs/base/04_5disabled_calculation.adoc

66 lines
2.3 KiB
Text
Raw Normal View History

2024-07-10 21:27:48 +02:00
== dictionaries/rougail/00-base.yml
[,yaml]
----
version: '1.1'
condition: no # a conditional variable
variable1:
description: a first variable
disabled:
type: jinja
jinja: |
{% if _.condition == "yes" %}
condition is yes
{% endif %}
description: if condition is egal to "yes"
variable2:
description: a second variable
disabled:
type: jinja
jinja: |
{% if _.condition == "yes" %}
condition is yes
{% endif %}
description: if condition is egal to "yes"
----
== Variables for "rougail"
[cols="118a,118a",options="header"]
|====
| Variable | Description
|
**rougail.condition** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
A conditional variable. +
**Default**: no
|
**rougail.variable1** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` _`disabled`_ |
A first variable. +
**Disabled**: if condition is egal to "yes".
|
**rougail.variable2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` _`disabled`_ |
A second variable. +
**Disabled**: if condition is egal to "yes".
|====
== Example with mandatory variables not filled in
[,yaml]
----
rougail:
variable1: example
variable2: example
----
== Example with all variables modifiable
[,yaml]
----
rougail:
condition: no
variable1: example
variable2: example
----