From 9789b645ff766037b2f17de09e3b7918fdc06ec6 Mon Sep 17 00:00:00 2001
From: antonin gallon
Date: Mon, 9 Feb 2026 22:24:17 +0100
Subject: [PATCH] =?UTF-8?q?ajout=20d'une=20fonction=20pour=20faire=20dans?=
=?UTF-8?q?=20l'autre=20sens=20:=20avoir=20toute=20les=20date=20(parent=20?=
=?UTF-8?q?et=20linked)=20+=20impl=C3=A9mentation=20de=20la=20fonction?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
site/plugins/helpers/index.php | 12 ++++++++++++
site/snippets/nav__texts--all.php | 9 ++++++---
site/snippets/nav__texts--collection.php | 8 +++++---
site/snippets/text-item.php | 6 +++++-
site/templates/author.php | 6 +++++-
site/templates/category.php | 8 +++++---
site/templates/year.php | 6 +++++-
7 files changed, 43 insertions(+), 12 deletions(-)
diff --git a/site/plugins/helpers/index.php b/site/plugins/helpers/index.php
index 69357d7..3a4d755 100644
--- a/site/plugins/helpers/index.php
+++ b/site/plugins/helpers/index.php
@@ -1,5 +1,17 @@
parent()]);
+
+ foreach (site()->find('textes')->children() as $year) {
+ if ($year->linkedTexts()->toPages()->has($article)) {
+ $years = $years->add($year);
+ }
+ }
+ return $years;
+}
+
function setTitleFontSizeClass($title, $level = 'h1')
{
$length = strlen($title);
diff --git a/site/snippets/nav__texts--all.php b/site/snippets/nav__texts--all.php
index 8ee0245..083c522 100644
--- a/site/snippets/nav__texts--all.php
+++ b/site/snippets/nav__texts--all.php
@@ -29,9 +29,12 @@
publié le published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?>
- / dans
+
+ = $year->title()?>/
+
+
+ = $article->category() ?>
diff --git a/site/snippets/nav__texts--collection.php b/site/snippets/nav__texts--collection.php
index f62e281..c3a3b3c 100644
--- a/site/snippets/nav__texts--collection.php
+++ b/site/snippets/nav__texts--collection.php
@@ -49,9 +49,11 @@
publié le published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?>
- / dans
+
+ = $year->title() ?> /
+
+ = $article->category() ?>
diff --git a/site/snippets/text-item.php b/site/snippets/text-item.php
index 969e2ca..3df1579 100644
--- a/site/snippets/text-item.php
+++ b/site/snippets/text-item.php
@@ -9,7 +9,11 @@
par
= $article->author()->toPage()->title() ?>
publié le = $article->published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?> / = $article->category() ?>
+ dans
+
+ = $year->title() ?> /
+
+ = $article->category() ?>
\ No newline at end of file
diff --git a/site/templates/author.php b/site/templates/author.php
index d002cf9..9372d83 100644
--- a/site/templates/author.php
+++ b/site/templates/author.php
@@ -23,7 +23,11 @@
diff --git a/site/templates/category.php b/site/templates/category.php
index bf96628..ffd6f30 100644
--- a/site/templates/category.php
+++ b/site/templates/category.php
@@ -27,9 +27,11 @@
href="/auteurs/= Str::slug($article->author()->toPage()->title()) ?>">= $article->author()->toPage()->title() ?>
publié le
= $article->published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?>
- / dans
+
+ = $year->title() ?> /
+
+ = $article->category() ?>
diff --git a/site/templates/year.php b/site/templates/year.php
index 933f5bb..9b6c4f4 100644
--- a/site/templates/year.php
+++ b/site/templates/year.php
@@ -40,7 +40,11 @@
par
= $article->author()->toPage()->title() ?>
publié le = $article->published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?> / = $article->category() ?>
+ dans
+
+ = $year->title() ?> /
+
+ = $article->category() ?>