{% block content %}

{{ page.title }}

{% if q_query is defined and q_query != '' %}

{{ 'search.results'|trans }}

{% for searchresult in pagerfanta.currentPageResults %} {% if not loop.first %}
{% endif %}

{{ searchresult['_source']['title'] }}

{% if searchresult['highlight'] is defined %}

{{ searchresult['highlight']['content'][0] | raw }}

{% else %}

{{ searchresult['_source']['content'] | truncate(300) | escape('html') }}

{% endif %}
{% endfor %}
{# Pagination #} {% if pagerfanta.haveToPaginate() %} {{ pagerfanta(pagerfanta, 'twitter_bootstrap3_translated', { 'prev_message': '', 'next_message': '', 'active_suffix': '' }) }} {% endif %}
{% set aggregations = pagerfanta.getAdapter().getAggregations() %} {% if aggregations is not empty %}
{% if aggregations['tag']['buckets']|length > 0 %}

Tags

{% endif %} {% if facets['type']['buckets']|length > 0 %}

Types

{% endif %}
{% endif %}
{% endif %} {% endblock %}