Minor tweaks

This commit is contained in:
Chaz Larson 2024-04-29 13:24:24 -05:00 committed by GitHub
parent 18e3d9886f
commit f7f4fb6808
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,9 +47,8 @@ In addition, templates also have a few special attributes that they can use:
??? blank "`default` - Sets what template variables default to.<a class="headerlink" href="#default" title="Permanent link"></a>"
<div id="default" />The `default` attribute allows default values for template variables to be used if they're not
specified in the call. It's value is a dictionary of key value pairs where the key is the template variable and the
value is the default value to set it to when not provided.
<div id="default" />The `default` attribute allows default values for template variables which will be used if they're not
specified in the call. You need to provide a list of variables and the value that variable should get if not told differently when the template is referenced. See the tooltips below.
**A variable cannot be default if it is a conditional variable.**
@ -83,13 +82,13 @@ In addition, templates also have a few special attributes that they can use:
1. This sets the default value of the template variable `my_sync_mode` to `sync`.
2. The value for template variable `my_sync_mode` will replace `<<my_sync_mode>>` here.
3. This specifiys that `my_sync_mode` for this definition will be `append`.
3. This specifies that `my_sync_mode` for this definition will be `append`.
4. Since `my_sync_mode` is not passed to this definition the value of `my_sync_mode` will be the default `sync`.
??? blank "`optional` - List of template variables to be removed when not provided.<a class="headerlink" href="#optional" title="Permanent link"></a>"
<div id="optional" />The `optional` attribute can specify variables that when not specified on the template call
will cause any attribute using one of those variables to be ignored in the template. It's value is a list of
will cause any attribute using one of those variables to be ignored in the template. Its value is a list of
template variables to be considered optional.
**You can make any template variable optional per collection by setting it to `null`.**
@ -126,7 +125,7 @@ In addition, templates also have a few special attributes that they can use:
1. This sets the template variable `my_sync_mode` as an optional variable.
2. The value for template variable `my_sync_mode` will replace `<<my_sync_mode>>` here or removed as optional.
3. This specifiys that `my_sync_mode` for this definition will be `append`.
3. This specifies that `my_sync_mode` for this definition will be `append`.
4. Since `my_sync_mode` is not passed to this definition it will ignore the entire `sync_mode` attribute in the
template.
@ -145,7 +144,7 @@ In addition, templates also have a few special attributes that they can use:
A condition block consists of one or more key value pairs comparing given template variables to pre supplied static
values.
The key is the name of the template variable who's value you want to compare. While the value is the staic value or
The key is the name of the template variable whose value you want to compare, while the value is the static value or
values to compare aginst. Every condition block must also have the `value` key which will be the value of the
template variable if all the conditions in that block are met.
@ -231,7 +230,7 @@ In addition, templates also have a few special attributes that they can use:
name: Movies
tmdb_id: 86311
Iron Man:
template:
1 template:
name: Movies
tmdb_id: 131292
```