{% for research in matchedResearches %} {% set tags= research.tags %} {% set tagSlug= research.tagsSlugs %} {% set length=research.abstract|length %} {% set contributers=research.contributers %}
{% if app.request.attributes.get('_route') != 'user_profile_show' %} {% endif %}
{{ research.hits~' -'}} {% if contributers|length >1 %} {{ contributers[0] }} {% for i in range(1,contributers|length -1) %} , {{ contributers[i] }} {% endfor %} {% elseif contributers|length >0 %} {{ contributers[0] }} {% endif %} {% if research.arabicPublisher is not null and research.arabicPublisher|length >1%} {% if contributers|length >0 %} {{ '-' }} {% endif %} {{(app.request.locale == 'ar')?research.arabicPublisher:research.englishPublisher}} {% elseif research.textualPublisher is not null and research.textualPublisher|length >1%} {% if contributers|length >0 %} {{ '-' }} {% endif %} {{research.textualPublisher}} {% endif %} {{ research.publicationDate|date('Y') }} {% if research.arabicCategory is not null %} {{ "(" ~ (app.request.locale == 'ar')?research.arabicCategory:research.englishCategory ~ ")" }} {% endif %}
{% if length >300 %}
{% if app.request.locale == "en" and research.englishAbstract != null and research.englishAbstract != ""%} {{ research.englishAbstract[0:250] }} {{ research.englishAbstract[250:] }} {% else %} {{ research.abstract[0:250] }} {{ research.abstract[250:] }} {% endif %}
{% else %}
{% if app.request.locale == "en" and research.englishAbstract != null and research.englishAbstract != ""%} {{ research.englishAbstract }} {% else %} {{ research.abstract }} {% endif %}
{% endif %}
{% set break= false %} {% set len= tags|length %} {% if len > 0 %} {% set threshold=5 %} {% for i in range(0,len-1) %} {% if tagSlug!="" %} {% if i <= threshold %} {{ tags[i] }} {%elseif i > threshold %} {% set break=true %} {{ tags[i] }} {% endif %} {% else %} {% set threshold=threshold+1 %} {% endif %} {% endfor %} {% if break %}  {{ 'المزيد..' }} {% endif %} {% endif %}
{% endfor %}