<divid="default"/>The `default` attribute allows default values for template variables to be used if they're not
<divid="default"/>The `default` attribute allows default values for template variables which will 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
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.
value is the default value to set it to when not provided.
**A variable cannot be default if it is a conditional variable.**
**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`.
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.
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`.
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.<aclass="headerlink"href="#optional"title="Permanent link">¶</a>"
??? blank "`optional` - List of template variables to be removed when not provided.<aclass="headerlink"href="#optional"title="Permanent link">¶</a>"
<divid="optional"/>The `optional` attribute can specify variables that when not specified on the template call
<divid="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.
template variables to be considered optional.
**You can make any template variable optional per collection by setting it to `null`.**
**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.
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.
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
4. Since `my_sync_mode` is not passed to this definition it will ignore the entire `sync_mode` attribute in the
template.
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
A condition block consists of one or more key value pairs comparing given template variables to pre supplied static
values.
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
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.
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: