{# /** * @file * Default theme implementation to present all user data. * * This template is used when viewing a registered user's page, * e.g., example.com/user/123. 123 being the user's ID. * * Available variables: * - content: A list of content items. Use 'content' to print all content, or * print a subset such as 'content.field_example'. Fields attached to a user * such as 'user_picture' are available as 'content.user_picture'. * - attributes: HTML attributes for the container element. * - user: A Drupal User entity. * * @see template_preprocess_user() * * @ingroup themeable {{ var_dump(user) }} */ #}
{{ content.user_picture }}
{{ content.field_name }} {% if user.hasRole('expert_user') %} Expert {% endif %}
{{ content.field_title_role }} {{ content.field_organisation }}
{{ content.field_bio_headline }} {% if (user.field_facebook_url_visible.value) %}      {% endif %} {% if (user.field_twitter_url_visible.value) %}      {% endif %} {% if (user.field_linkedin_url_visible.value) %}      {% endif %}
{% if (user.field_contact_number_visible.value) %}
{{ content.field_location }}
{{ content.field_contact_number }}
{% else %}
{{ content.field_location }}
{% endif %}

Areas of Expertise

{% for item in content.field_themes %} {% if item['#title'] %} {% if item['#options'].entity.field_main_theme.value %}
{{ item['#title'] }}
{{ item['#title'] }}
{% endif %} {% endif %} {% endfor %}
{{ content.field_name }} {% if user.hasRole('expert_user') %} Expert {% endif %}
{{ content.field_title_role }} {{ content.field_organisation }}
{% if (user.field_facebook_url_visible.value) %}      {% endif %} {% if (user.field_twitter_url_visible.value) %}      {% endif %} {% if (user.field_linkedin_url_visible.value) %}      {% endif %}
{{ content.field_bio_headline }}
{% if (user.field_contact_number_visible.value) %}
{{ content.field_location }}
{{ content.field_contact_number }}
{% else %}
{{ content.field_location }}
{% endif %} {% if user.hasRole('organisation') %}

About Us

{% else %}

Bio

{% endif %} {{ content.field_about_me }} {% if not user.hasRole('organisation') %} {{ content.field_languages_spoken }} {% endif %} {% set mains = {} %} {% set subs = [] %} {% set myindex = 0 %} {% for item in content.field_themes %} {% if item['#title'] %} {% if item['#options'].entity.field_main_theme.value %} {% set myindex = myindex + 1 %} {% set mains = mains | merge({ ('main' ~ myindex): { 'id': 'main' ~ myindex, 'image': item['#options'].entity.field_image.entity.fileuri | image_style('thumbnail'), 'title': item['#title'] } }) %} {% else %} {% set subs = subs | merge({ (loop.index): { 'main': 'main' ~ myindex, 'title': item['#title'] } }) %} {# {% set myindex = myindex + 1 %}#} {% endif %} {% endif %} {% endfor %} {# kpr(mains) }} {{ kpr(subs) #} {% if (subs) %}

Areas of Expertise

{% for item in mains %}
 
{{ item['title'] }} {% for sub in subs %} {% if (sub['main'] == item['id']) %}
{{ sub['title'] }}
{% endif %} {% endfor %}
{% endfor %} {% endif %}
 

Disciplines

{{ content.field_disciplines }}

Regions

{{ content.field_regions }}

Countries

{{ content.field_countries }} {# /**
    {% for key, value in content.field_themes.0 %}
  1. {{ key }}
  2. {% endfor %}
-- {{ item['#options'].entity.tid.value }}-- {% if content %} {{- content -}} {% endif %} */ #}
{% set viewMode = elements['#view_mode'] %} {% if (viewMode == 'full') %} {% if user.hasRole('expert_user')or user.hasRole('organisation') %} {% set workview = drupal_view('related_content', 'block_my_work') | render %} {% if workview | striptags | trim %}
Design elememt
{% if user.hasRole('expert_user') %}

{{ "My Work"|t }}

{% else %}

{{ "Our Work"|t }}

{% endif %} {{ workview }}
{% endif %} {% endif %}
+ {{ request_connection }} {% if (user.field_website_url_visible.value) %} {{ content.field_personal_website_url }} {% endif %} {% if (user.field_cv_available.value) %} {{ content.field_curriculum }} {% endif %}
{% endif %}