Use double-quotes in template example and warn about single-quotes

This commit is contained in:
Eldon Koyle
2016-03-16 11:26:19 -06:00
parent 621ea93831
commit 36818d6c59

View File

@@ -139,9 +139,12 @@ Alert sent to: {foreach %contacts}%value <%key> {/foreach}
Conditional formatting example, will display a link to the host in email or just the hostname in any other transport:
```text
{if %transport == mail}<a href='https://my.librenms.install/device/device=%hostname/'>%hostname</a>{else}%hostname{/if}
{if %transport == mail}<a href="https://my.librenms.install/device/device=%hostname/">%hostname</a>{else}%hostname{/if}
```
Note the use of double-quotes. Single quotes (`'`) in templates will be escaped (replaced with `\'`) in the output and should therefore be avoided.
# <a name="transports">Transports</a>
Transports are located within `$config['install_dir']/includes/alerts/transports.*.php` and defined as well as configured via ~~`$config['alert']['transports']['Example'] = 'Some Options'`~~.