Mention how to get config variables in templates

This commit is contained in:
Vincent Prouillet 2020-04-12 18:48:00 +02:00
parent 469babbd97
commit fb6cbe008f
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ A few variables are available on all templates except RSS and the sitemap:
- `current_url`: the full URL for the current page - `current_url`: the full URL for the current page
- `lang`: the language for the current page; `null` if the page/section doesn't have a language set - `lang`: the language for the current page; `null` if the page/section doesn't have a language set
Config variables can be accessed like `config.variable`, in HTML for example with `{{ config.base_url }}`.
The 404 template does not get `current_path` and `current_url` (this information cannot be determined). The 404 template does not get `current_path` and `current_url` (this information cannot be determined).
## Standard templates ## Standard templates