You are here

profile--profile--small_teaser.html.twig in Open Social 8.9

Default theme implementation for profiles.

Available variables:

  • content: Items for the content of the profile. Use 'content' to print them all, or print a subset such as 'content.title'. Use the following code to exclude the printing of a given child element:

  {{ content|without('title') }}
  
  • attributes: HTML attributes for the wrapper.
  • profile: The profile object.
  • url: The profile URL.

File

themes/socialbase/templates/profile/profile--profile--small_teaser.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. *
  5. * Default theme implementation for profiles.
  6. *
  7. * Available variables:
  8. * - content: Items for the content of the profile.
  9. * Use 'content' to print them all, or print a subset such as
  10. * 'content.title'. Use the following code to exclude the
  11. * printing of a given child element:
  12. * @code
  13. * {{ content|without('title') }}
  14. * @endcode
  15. * - attributes: HTML attributes for the wrapper.
  16. * - profile: The profile object.
  17. * - url: The profile URL.
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22. <div class="card__block card__block--list teaser--small">
  23. <a href="{{ profile_home }}" class="card__text list-item">
  24. <span class="list-item__avatar list-item__avatar--medium">
  25. {{ content.field_profile_image }}
  26. </span>
  27. <span class="list-item__text">
  28. <span class="teaser--small__title">
  29. {{ profile_name }} {{ profile_name_extra }}
  30. </span>
  31. {% if content.field_profile_function|render or content.field_profile_organization|render %}
  32. <div class="list-item__text--small">
  33. {% if content.field_profile_organization|render %}
  34. {{ '@function @ @organization'|t({'@function': content.field_profile_function|render, '@organization': content.field_profile_organization|render}) }}
  35. {% else %}
  36. {{ content.field_profile_function }}
  37. {% endif %}
  38. </div>
  39. {% endif %}
  40. </span>
  41. </a>
  42. </div>