texts : sort and style
All checks were successful
Deploy / Deploy to Production (push) Successful in 6s

This commit is contained in:
isUnknown 2026-03-28 16:53:17 +01:00
parent 680871d6e2
commit 80efbf3d5f
6 changed files with 148 additions and 112 deletions

View file

@ -1,8 +1,12 @@
<?php
class YearPage extends Page{
public function allTexts(){
$texts = $this->children()->listed();
$princeps = $this->children()->listed()->first();
$texts = $this->children()->listed()->without($princeps);
$linked = $this->linkedTexts()->toPages();
return $texts->merge($linked);
$allTexts = $texts->merge($linked);
return $allTexts->sort('published', 'desc')->prepend($princeps);
}
}