-
|
Is there a way to conditionally include a file depending on the value of a variable? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
What do you mean with "include"? Jinja include? Render the whole file conditionally? Something else? |
Beta Was this translation helpful? Give feedback.
-
|
Render the whole file conditionally. If a variable |
Beta Was this translation helpful? Give feedback.
-
|
Just template the file name. Call it something like: If the file/dir name become empty after applying templating, it will be skipped. |
Beta Was this translation helpful? Give feedback.
Just template the file name. Call it something like:
{% if abc %}myfile.txt{% endif %}If the file/dir name become empty after applying templating, it will be skipped.