profile--profile--hero.html.twig in Open Social 8
Same filename and directory in other branches
- 8.9 themes/socialbase/templates/profile/profile--profile--hero.html.twig
- 8.2 themes/socialbase/templates/profile/profile--profile--hero.html.twig
- 8.3 themes/socialbase/templates/profile/profile--profile--hero.html.twig
- 8.4 themes/socialbase/templates/profile/profile--profile--hero.html.twig
- 8.5 themes/socialbase/templates/profile/profile--profile--hero.html.twig
- 8.6 themes/socialbase/templates/profile/profile--profile--hero.html.twig
- 8.7 themes/socialbase/templates/profile/profile--profile--hero.html.twig
- 8.8 themes/socialbase/templates/profile/profile--profile--hero.html.twig
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--hero.html.twigView source
- {#
- /**
- * @file
- *
- * 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:
- * @code
- * {{ content|without('title') }}
- * @endcode
- * - attributes: HTML attributes for the wrapper.
- * - profile: The profile object.
- * - url: The profile URL.
- *
- * @ingroup themeable
- */
- #}
- {{ attach_library('socialbase/hero')}}
-
- {% if profile_hero_styled_image_url %}
- <div style="background-image: url('{{ profile_hero_styled_image_url }}')" class="cover cover-img cover-img-gradient">
- {% else %}
- <div class="cover">
- {% endif %}
- <div class="hero__bgimage-overlay"></div>
- {% if profile_edit_url %}
- <div class="hero-action-button">
- <a href="{{ profile_edit_url }}" title="{% trans %}Edit profile information{% endtrans %}" class="btn btn-raised btn-default btn-floating">
- <svg class="icon-medium">
- <use xlink:href="#icon-edit"></use>
- </svg>
- </a>
- </div>
- {% endif %}
-
- <div class="cover-wrap">
-
- <header>
- {{ content.field_profile_image }}
- <h1 class="page-title">
- {{ profile_name }}
- </h1>
- </header>
-
-
- {% if (content.field_profile_function|render or content.field_profile_organization|render) or profile_contact_label == 'private_message' %}
- <footer class="hero-footer">
- {% endif %}
-
- <div class="hero-footer__text">
- {% if content.field_profile_function|render %}
- <strong>{{ content.field_profile_function }}</strong>
- {% endif %}
- {% if (content.field_profile_function|render and content.field_profile_organization|render) %}
- -
- {% endif %}
- {{ content.field_profile_organization }}
- </div>
-
- {% if profile_contact_label == 'private_message' %}
- <div class="hero-footer__cta">
- <a href="{{ profile_contact_url }}" class="btn btn-accent btn-lg btn-raised">
- {% trans %} Private message {% endtrans %}
- </a>
- </div>
- {% endif %}
-
- {% if (content.field_profile_function|render or content.field_profile_organization|render) or profile_contact_label == 'private_message' %}
- </footer>
- {% endif %}
-
- {# render other fields that developers might add #}
- {{ content|without('field_profile_first_name', 'field_profile_last_name', 'field_profile_image', 'field_profile_function', 'field_profile_organization') }}
- </div>
-
- </div>