texts : sort and style
All checks were successful
Deploy / Deploy to Production (push) Successful in 6s
All checks were successful
Deploy / Deploy to Production (push) Successful in 6s
This commit is contained in:
parent
680871d6e2
commit
80efbf3d5f
6 changed files with 148 additions and 112 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue