rougail-output-doc/tests/docs/examples/60_6family_dynamic_sub_dynamic.md

86 lines
1.6 KiB
Markdown
Raw Normal View History

2024-11-15 08:13:45 +01:00
---
gitea: none
include_toc: true
---
# dictionaries/rougail/00-base.yml
```yaml
---
version: '1.1'
var: # A identifier variable
- val1
- val2
dyn{{ identifier }}:
description: A dynamic family
dynamic:
variable: _.var
var:
description: A dynamic variable
multi: true
default:
jinja: |
{% for val in __.var %}
t{{ val }}
{% endfor %}
description: add 't' to each var value
dyn_{{ identifier }}:
description: a Second dynamic variable
dynamic:
variable: rougail.dyn{{ identifier }}.var
var:
description: A variable dynamic
default:
type: identifier
var_identifier:
description: identifier from first family
default:
type: identifier
identifier: 0
var_identifiers:
description: merge identifiers
default:
jinja: |
{{ s1 }}-{{ s2 }}
params:
s1:
type: identifier
identifier: 0
s2:
type: identifier
identifier: 1
description: join identifier 1 et identifier 2
```
# Example with all variables modifiable
```yaml
---
rougail:
var:
- val1
- val2
dynval1:
var:
- tval1
- tval2
dyn_tval1:
var: tval1
var_identifier: val1
var_identifiers: val1-tval1
dyn_tval2:
var: tval2
var_identifier: val1
var_identifiers: val1-tval2
dynval2:
var:
- tval1
- tval2
dyn_tval1:
var: tval1
var_identifier: val2
var_identifiers: val2-tval1
dyn_tval2:
var: tval2
var_identifier: val2
var_identifiers: val2-tval2
```