Skip to content

Commit

Permalink
#165 - Mention multi variable assignments in include template tag ref…
Browse files Browse the repository at this point in the history
…erence
  • Loading branch information
ellmetha committed Feb 22, 2024
1 parent 9c3c983 commit fd79b0e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/docs/templates/reference/tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ Finally, it should be noted that additional variables that are specific to the i
{% include "path/to/my_snippet.html" with new_var="hello" %}
```

Multiple variables can also be specified if necessary. In that case, variable assignments must be separated by commas. For example:

```html
{% include "path/to/my_snippet.html" with var1="foo", var2="bar" %}
```

:::caution
Templates that are included using the `include` template are parsed and rendered _when_ the including template is rendered as well. Included templates are not parsed when the including template is parsed itself. This means that the including template and the included template are always rendered _separately_.
:::
Expand Down
6 changes: 6 additions & 0 deletions docs/versioned_docs/version-0.4/templates/reference/tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ Finally, it should be noted that additional variables that are specific to the i
{% include "path/to/my_snippet.html" with new_var="hello" %}
```

Multiple variables can also be specified if necessary. In that case, variable assignments must be separated by commas. For example:

```html
{% include "path/to/my_snippet.html" with var1="foo", var2="bar" %}
```

:::caution
Templates that are included using the `include` template are parsed and rendered _when_ the including template is rendered as well. Included templates are not parsed when the including template is parsed itself. This means that the including template and the included template are always rendered _separately_.
:::
Expand Down

0 comments on commit fd79b0e

Please sign in to comment.