getgrav / grav-learn

Grav Learn (exhaustive grav documentation)

Home Page:http://learn.getgrav.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uri.params wrong documented or missbehaving

NicoHood opened this issue · comments

The documentation of those two differs:

https://learn.getgrav.org/16/themes/theme-vars#params
https://learn.getgrav.org/16/api#class-grav-common-uri

The api details additional parameters for uri.params. Also uri.params does not return an array, even if I have multiple tags set:

{{ uri.params("tag", true) |get_type}}

returns string

Url used: www.example.com/blog/tag:one,two,three

theme_vars() is competely different from uri.params. Theme vars is for retrieving theme-specific configuration values from theme configuration but with page-level overrides. Uri.params, simply gets the values of the params passed in the URI.

Okay thanks. but then the api implementation or documentation seems wrong to me. It does not return an array. I used:
uri.param(taxonomy)|split(',') to get an array of the selected tags

Edit: Is there also a variable for the secondary seperator ','? I did not yet found anything like this.

it's possible, that we need to rebuild the API as that is generated manually...