fix next / previous events
This commit is contained in:
parent
e5e8cad6ca
commit
94cf47ee43
3 changed files with 14 additions and 9 deletions
|
|
@ -107,12 +107,12 @@
|
|||
<section class="yellow">
|
||||
<h2>Prochainement — <?= $page->children()->first()->title() ?></h2>
|
||||
</section>
|
||||
<?php snippet('events-grid', ['events' => $futureEvents, 'columns' => 3]) ?>
|
||||
<?php if ($pastEvents->count() > 0): ?>
|
||||
<?php snippet('events-grid', ['events' => $events['next'], 'columns' => 3]) ?>
|
||||
<?php if ($events['previous']->count() > 0): ?>
|
||||
<section class="yellow">
|
||||
<h2>Événements passés</h2>
|
||||
</section>
|
||||
<?php snippet('events-grid', ['events' => $pastEvents, 'columns' => 3]) ?>
|
||||
<?php snippet('events-grid', ['events' => $events['previous'], 'columns' => 3]) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue