From f7f4fb68083f3b6db243d177aa706828abfe2dad Mon Sep 17 00:00:00 2001 From: Chaz Larson Date: Mon, 29 Apr 2024 13:24:24 -0500 Subject: [PATCH] Minor tweaks --- docs/files/templates.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/files/templates.md b/docs/files/templates.md index ea2214aa..df187627 100644 --- a/docs/files/templates.md +++ b/docs/files/templates.md @@ -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." -
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. +
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 `<>` 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."
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 `<>` 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 ```