videoPreview()->toFile(); $hasVideo = $videoPreview || $page->videoUrl()->isNotEmpty(); $lang = kirby()->language(); $locale = $lang ? $lang->locale(LC_ALL) : 'fr_FR.UTF-8'; $dateLocale = substr(is_array($locale) ? reset($locale) : $locale, 0, 5); ?>
videoUrl()->isNotEmpty()): ?>
heroCaption()->isNotEmpty()): ?>
heroCaption()->inline() ?>
cover()->toFile()): ?>
<?= $page->title()->esc() ?>
heroCaption()->isNotEmpty()): ?>
heroCaption()->inline() ?>
caption()->isNotEmpty()): ?>
caption() ?>
incidentDate()->isNotEmpty()): ?>
Date de l'incident
incidentLocation()->isNotEmpty()): ?>
Lieu de l'incident
incidentLocation()->esc() ?>
incidentConsequences()->isNotEmpty()): ?>
Conséquences
incidentConsequences()->esc() ?>
keywords()->split()): ?> 0): ?>
Mots-clés
methodology()->split()): ?> 0): ?>
Méthodologie
team()->toStructure()): ?> isNotEmpty()): ?>
Équipe
name()->esc(); if ($member->role()->isNotEmpty()) { $members[] = $name . ' (' . $member->role()->esc() . ')'; } else { $members[] = $name; } } echo implode(', ', $members); ?>
partners()->toStructure()): ?> isNotEmpty()): ?>
Partenaire(s)
link()->isNotEmpty()): ?> link() . '" target="_blank">' . $partner->name()->esc() . '' ?> name()->esc() ?>
created()->isNotEmpty()): ?>
Date de publication
body()->toLayouts() as $layout): ?> columns(); $columnCount = $columns->count(); ?> first(); $blocks = $column->blocks(); $hasHeading = false; $hasOtherContent = false; // Check what types of content we have foreach ($blocks as $block) { if ($block->type() === 'heading') { $hasHeading = true; } else { $hasOtherContent = true; } } ?>
type() === 'heading'): ?> <level()->or('h3') ?>>text() ?>level()->or('h3') ?>> type() === 'text'): ?>
text() ?>
type() === 'image'): ?>
image()->toFile(); ?>
<?= $image->alt()->esc() ?>
caption()->isNotEmpty()): ?>

caption()->html() ?>

type() === 'beforeafter'): ?>
type(), ['block' => $block]) ?>
type() === 'video'): ?>
type(), ['block' => $block]) ?>
type() === 'horizontal-gallery'): ?> type(), ['block' => $block]) ?> type() === 'insert'): ?> $block]) ?>
first(); $lastColumn = $columns->last(); ?>
blocks() as $block): ?> type() === 'image'): ?>
image()->toFile(); ?>
<?= $image->alt()->esc() ?>
caption()->isNotEmpty()): ?>

caption()->html() ?>

type() === 'beforeafter'): ?> type(), ['block' => $block]) ?> type() === 'video'): ?> type(), ['block' => $block]) ?> type() === 'gallery'): ?> $block]) ?>
blocks() as $block): ?> type() === 'text'): ?> text() ?> type() === 'heading'): ?> <level()->or('h3') ?>>text() ?>level()->or('h3') ?>> type() === 'insert'): ?> $block]) ?>
find('ressources'); $resources = $resourcesParent ? $resourcesParent->children()->listed()->filter(function($resource) use ($page) { return $resource->linkedInvestigations()->toPages()->has($page); }) : null; ?> isNotEmpty()): ?> find('impacts'); $impacts = $impactsParent ? $impactsParent->children()->listed()->filter(function($impact) use ($page) { return $impact->linkedInvestigations()->toPages()->has($page); }) : null; ?> isNotEmpty()): ?> relatedInvestigations()->toPages(); if ($relatedInvestigations->isEmpty()) { // Si pas d'enquêtes liées définies, prendre les 3 dernières enquêtes (sauf la page actuelle) $relatedInvestigations = $page->parent()->children()->filterBy('intendedTemplate', 'investigation')->not($page)->listed()->limit(3); } ?> find('packages'); $package = $packagesParent ? $packagesParent->children()->listed()->filter(fn($p) => $p->linkedContent()->toPages()->has($page))->first() : null; if ($package): $investigationsCount = $package->linkedContent()->toPages()->count(); ?> isNotEmpty()): ?>