templates/ProfileList/list.profiles.html.twig line 1

Open in your IDE?
  1. {% set profiles_array = [] %}
  2. {% if profiles != null %}
  3.     {% if profiles.array is defined %}
  4.         {# Legacy listing provider #}
  5.         {% set profiles_array = profiles.array %}
  6.     {% else %}
  7.         {# New listing microservice. Profiles array already contains top placement #}
  8.         {% set profiles_array = profiles %}
  9.     {% endif %}
  10. {% endif %}
  11. {% set hidePreferredButton = hidePreferredButton is defined ? hidePreferredButton : false %}
  12. {% set likeButton = likeButton is defined ? likeButton : false %}
  13. {%- for profile in profiles_array -%}
  14.     {%- set lazyLoad = loop.index == 1 -%}
  15.     {% include 'ProfileList/profile.html.twig' with {
  16.         profile: profile,
  17.         lazyLoad: lazyLoad,
  18.         isProfileTop: (loop.first and profile is top_placement)
  19.     } %}
  20. {%- endfor -%}
  21. {%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
  22.     {{- porpaginas_render(profiles) -}}
  23. {% endif %}