{% if uri.param('category') is defined and uri.param('category') is not empty %} {% set category = [] %} {% for item in uri.param('category')|split(',') %} {% set category = category|merge([item|url_decode]) %} {% endfor %} {% endif %} {% if uri.param('color') is defined and uri.param('color') is not empty %} {% set color = [] %} {% for item in uri.param('color')|split(',') %} {% set color = color|merge([item|url_decode]) %} {% endfor %} {% endif %} {% if uri.param('tag') is defined and uri.param('tag') is not empty %} {% set tag = [] %} {% for item in uri.param('tag')|split(',') %} {% set tag = tag|merge([item|url_decode]) %} {% endfor %} {% endif %} {% set params = { 'display': uri.param('display')|default(), 'start': uri.param('start')|default(), 'end': uri.param('end')|default(), 'orderBy': uri.param('sort-by')|default(), 'orderDir': uri.param('sort-dir')|default(), 'limit': uri.param('limit')|default(), 'currentPage': uri.param('page')|default(), 'category': category|default([]), 'color': color|default([]), 'tag': tag|default([]) } %}