Thank you very mutch
It’s a great solution.
Now I will have to integrate it into a filter structure with a queryparam like this:
{% set queryparam = “&orderBy=-event_date” %}
<h4 style=“text-align: center;”>Filter the events</h4>
<p style=“text-align: center;”>You are searching for:
{% if request.query_dict.event_type in [“1”, “2”, “3”] %}
{% set queryparam = queryparam ~ “&event_type=”~request.query_dict.event_type|urlencode %}
{% endif %}
…
and thi is the form for the filter
<form id=“form_id” method=“get”>
<div class=“row-fluid”>
<div class=“span3”>
<div>Event type: </div>
<p>
<select name=“tipo_evento” form=“form_id” >
<option value=“show-all”>Show all</option>
{% set types = hubdb_table_column(671570, “event_type”).options %}
{% for choice in types %}
{% set type_list = type_list~choice.id|list%}
{% if choice.id == request.query_dict.event_type%}
<option selected=“selected” value=“{{ choice.id }}”>{{ choice.name }}</option>
{% else %}
<option value=“{{ choice.id }}”>{{ choice.name }}</option>
{% endif %}
{% endfor %}
</select>
</p>
</div>
…
You can see an example here http://www.think-inbound.com/calendario-eventi
Giovanni