I can access {{ uri.params }} in a Twig template, but if I try something like
{{ uri.param['location'] }}
as documented at http://learn.getgrav.org/themes/theme-vars
I get an error.
Any idea what I am doing wrong?
Thanks!
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
I can access {{ uri.params }} in a Twig template, but if I try something like
{{ uri.param['location'] }}
as documented at http://learn.getgrav.org/themes/theme-vars
I get an error.
Any idea what I am doing wrong?
Thanks!
Oh, I figured this out! There is an error in the docs...
uri.param['param'] = foo
should be something like:
uri.param[('category'') = foo
(parens instead of brackets)
Help a brother out by submitting a pull request on the docs with the fix?
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1280 | 9 years ago | ||
| 2 | 888 | 9 years ago | ||
| 2 | 4016 | 9 years ago | ||
| 1 | 2892 | 9 years ago | ||
| 3 | 1076 | 9 years ago |