event - update mapado infos on update
This commit is contained in:
parent
6df3927970
commit
c1a94e832f
10 changed files with 215 additions and 11 deletions
|
|
@ -8,5 +8,18 @@
|
|||
</div>
|
||||
</div>
|
||||
<?php snippet('calendar-strip') ?>
|
||||
<?php snippet('events-grid') ?>
|
||||
<?php
|
||||
$currentSeason = page('programme')->children()->first()->children();
|
||||
$orderedEvents = $currentSeason->sortBy(function ($event) {
|
||||
if ($event->isMapadoEvent() == 'true') {
|
||||
return $event->remoteSessions()->toStructure()->toArray()[0]['date'];
|
||||
} else {
|
||||
return $event->sessions()->toStructure()->toArray()[0]['date'];
|
||||
}
|
||||
},
|
||||
'asc'
|
||||
);
|
||||
|
||||
snippet('events-grid', ['events' => $orderedEvents->limit(2)])
|
||||
?>
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue