You can access the query string from a Slim Twig template by using the get_uri() method:
{% set query = get_uri().getQuery() %}
{% set query = query|length ? '?'~query : '' %}
You can access the query string from a Slim Twig template by using the get_uri() method:
{% set query = get_uri().getQuery() %}
{% set query = query|length ? '?'~query : '' %}