Object containing all of the query string parameters for the current page.
Specific parameters may be accessed using {{ request.query_params.parametername }} or {{ request.query_params['parameter-name'] }}.
You may also treat this object as a list containing all of the query parameters which may be iterated using a {% for %} loop. For more details, see the examples below:
Field | Type | Description |
object_type | string | Will always be "query_params". |
is_valid | true/false | Will always be true. |
by_index | list | A list of all of the query parameters in the order they appear in the URL. Each item in the list is the full query parameter - including both the key and the value. Note that this may include empty and/or duplicate query parameters. |
by_name | object | An object whose properties match the query parameters in the URL, including query parameters with empty values. If the same query parameter appears multiple times in the URL, the value will be a comma-separated list of all of the values for that key. |
keys | list | A list of all of the non-empty parameter names in the URL. |
count | number | The number of distinct query parameters (by name) in the URL. |
length | number | The total number of query parameters (by index) in the URL. |
Getting request parameters and fetching blog_posts
CopyURL: www.domain.com/path/to/page?alpha=abc&beta=b&&emptyvariable&animals=cat&animals=dog&animals=fish
Copy