params - Liquid Filter Reference - 1.0.0

Filter Name params
Group Url
Version 1.0.0

Description

Adds query params to a url or path

Examples

When the url or path has no query parameters, it creates a new query string with the supplied parameters:
{{ '/about-us' | params: foo: "bar" }}
/about-us?foo=bar
When the url or path already has query parameters, it appends the new parameters to the existing query string:
{{ '/about-us?fizz=buzz' | params: foo: "bar" }}
/about-us?fizz=buzz&foo=bar
When there are multiple supplied parameters, it adds all new parameters:
{{ 'http://example.com/about-us' | params: foo: "bar", fizz: "buzz" }}
http://example.com/about-us?foo=bar&fizz=buzz

Back to Filter List

Back to Liquid Reference for 1.0.0

 

 
Back to Documentation