ajout de la methode allTexts() dans site\models\year.php

This commit is contained in:
antonin gallon 2026-02-09 20:57:56 +01:00
parent 344af4c0fe
commit dee8f94182
2 changed files with 10 additions and 1 deletions

View file

@ -18,7 +18,8 @@
class="see-more toggle-btn toggle-btn--left" @click="edito = !edito">Lire</button>
<?php endif ?>
<ul class="panel-item-content__texts texts">
<?php foreach($section->children() as $article): ?>
<?php $articles = method_exists($section, 'allTexts') ? $section->allTexts() : $section->children(); ?>
<?php foreach($articles as $article): ?>
<?php
$author = $article->author()->toPage() == null ? 'inconnu' : $article->author()->toPage()->title();
?>