I have a site with Drupal 8 and I want to customize the templates of my pages.
I use the Profile module.
How to display the rendered entity of the "compact" display of the user account in the profile ?
This is the template to customize the profile page.
{#
/**
* @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, if available.
*
* @ingroup themeable
*/
#}
<div{{ attributes.addClass('profile--personnel--teaser') }}>
<div class="views-row">
{{ ??? RENDERED ENTITY USER COMPACT ??? }}
</div>
</div>
UPDATE
<div{{ attributes.addClass('profile--personnel--teaser') }}>
<div class="row">
<div class="bs-field-type">
{{ profile.type.entity.label }}
</div>
<div class="bs-field-image">
{{ drupal_entity('user', profile.uid.target_id, 'compact') }}
</div>
<h3 class="bs-field-title">
{{ profile.getOwner().name.value }}
</h3>
<div class="bs-field-status">
</div>
<div class="bs-field-sex">
{{ content.field_personnel_sexe }}
</div>
<div class="bs-field-age">
{{ content.field_personnel_naissance }}
</div>
<div class="bs-field-address">
{{ content.field_personnel_adresse }}
</div>
<div class="bs-field-contact">
<a class="btn btn-success" href="/messenger#new">
<i class="fas fa-comment fa-lg"></i> Envoyer un message
</a>
</div>
<div class="bs-field-more">
Voir son profil
</div>
<div class="bs-field-link">
<a href="{{ url }}" title="{{ content.title.value }}"></a>
</div>
</div>
</div>