From e36eae0b6f6abb947cc834b5fc615bc20c2eb495 Mon Sep 17 00:00:00 2001 From: Julie Blanc Date: Wed, 25 Feb 2026 18:35:20 +0100 Subject: [PATCH] add latest content at bottom --- site/templates/impact.php | 50 ++++++++++++++++++++++++++++++++++-- site/templates/news-item.php | 43 ++++++++++++++++++++++++++++--- 2 files changed, 88 insertions(+), 5 deletions(-) diff --git a/site/templates/impact.php b/site/templates/impact.php index 614a2f9..4642ba8 100644 --- a/site/templates/impact.php +++ b/site/templates/impact.php @@ -28,15 +28,19 @@ -
+ body()->isNotEmpty()): ?> +
body()->toBlocks() ?> +
-
+ + + linkedInvestigations()->toPages() ?> isNotEmpty()): ?> @@ -75,6 +79,48 @@ + language(); + $locale = $lang ? $lang->locale(LC_ALL) : 'fr_FR.UTF-8'; + $dateLocale = substr(is_array($locale) ? reset($locale) : $locale, 0, 5); + + $latestImpacts = site()->find('impacts') + ->children()->listed()->not($page) + ->sortBy('created', 'desc') + ->limit(5); + ?> + + isNotEmpty()): ?> + + + + diff --git a/site/templates/news-item.php b/site/templates/news-item.php index dfefac7..d837dde 100644 --- a/site/templates/news-item.php +++ b/site/templates/news-item.php @@ -33,13 +33,13 @@ $dateLocale = substr(is_array($locale) ? reset($locale) : $locale, 0, 5); -
- body()->isNotEmpty()): ?> +
body()->toBlocks() ?> +
-
+ linkedInvestigations()->toPages() ?> isNotEmpty()): ?> @@ -76,6 +76,43 @@ $dateLocale = substr(is_array($locale) ? reset($locale) : $locale, 0, 5); + find('news') + ->children()->listed()->not($page) + ->sortBy('created', 'desc') + ->limit(5); + ?> + + isNotEmpty()): ?> + + +