hookkeywords + team with role

This commit is contained in:
Julie Blanc 2026-02-14 17:29:27 +01:00
parent 0726c50993
commit 243583d024
3 changed files with 77 additions and 12 deletions

View file

@ -120,11 +120,22 @@
<?php endif ?>
<?php endif ?>
<?php if ($team = $page->team()->split()): ?>
<?php if (count($team) > 0): ?>
<?php if ($team = $page->team()->toStructure()): ?>
<?php if ($team->isNotEmpty()): ?>
<div class="dl__group">
<dt>Équipe</dt>
<dd><?= implode(', ', array_map('esc', $team)) ?></dd>
<dd><?php
$members = [];
foreach ($team as $member) {
$name = $member->name()->esc();
if ($member->role()->isNotEmpty()) {
$members[] = $name . ' (' . $member->role()->esc() . ')';
} else {
$members[] = $name;
}
}
echo implode(', ', $members);
?></dd>
</div>
<?php endif ?>
<?php endif ?>