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!
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 | 1981 | 9 years ago | ||
| 2 | 1334 | 9 years ago | ||
| 2 | 4536 | 9 years ago | ||
| 1 | 3391 | 9 years ago | ||
| 3 | 1486 | 9 years ago |