Pass id from URL to next page I have made a product page overview that displays all the products of my webshop. On the left, I have placed a filter where people can filter the products (e.g. country can be France, Germany...). When a customer selects a country (e.g. France) the URL changes and the id of the choice (France) is added to the URL. Now I want the next thing: when a customer selects a product, I want that the id that was added in the previous URL also is added to the URL of the product detail page. 

So when you have www.test.com/products, you select France, you get www.test.com/products?field=country%1 and when you select a product, you should get www.test.com/products/product?field=country%1 instead of just www.test.com/products/product... 

Anyone who can help?
To get the query string use

\Drupal::request()-&gt;query-&gt;all();


To further dig into use kint() and debug the  \Drupal::request()