Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uri.params wrong documented or missbehaving #828

Open
NicoHood opened this issue Aug 21, 2020 · 3 comments
Open

uri.params wrong documented or missbehaving #828

NicoHood opened this issue Aug 21, 2020 · 3 comments

Comments

@NicoHood
Copy link
Contributor

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

@rhukster
Copy link
Member

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.

@NicoHood
Copy link
Contributor Author

NicoHood commented Aug 21, 2020

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.

@rhukster
Copy link
Member

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

@rhukster rhukster added the api label Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants