{# Renders query parameters as hidden inputs so they survive a filter submit. A filter form only submits its own fields, so anything else that describes the current list — the sorting, the page size, the return URL — has to be carried along explicitly or it is lost the moment somebody searches. #} {% macro render(values, prefix) %} {%- for key, value in values -%} {%- set name = prefix ? prefix ~ '[' ~ key ~ ']' : key -%} {%- if value is iterable -%} {{ _self.render(value, name) }} {%- else -%} {%- endif -%} {%- endfor -%} {% endmacro %}