home > events : add custom events field (from 0 to 3 events) #7
This commit is contained in:
parent
c02b9840f7
commit
6eba8122ea
2 changed files with 13 additions and 8 deletions
|
|
@ -91,10 +91,22 @@ tabs:
|
|||
cover: true
|
||||
when:
|
||||
heroMode: custom
|
||||
|
||||
- width: 1/1
|
||||
fields:
|
||||
line:
|
||||
type: line
|
||||
events:
|
||||
label: Événement
|
||||
type: pages
|
||||
layout: cards
|
||||
size: huge
|
||||
query: page('programme').grandChildren
|
||||
max: 3
|
||||
image:
|
||||
cover: true
|
||||
otherLine:
|
||||
type: line
|
||||
- width: 1/1
|
||||
fields:
|
||||
callout: fields/callout
|
||||
|
|
|
|||
|
|
@ -50,18 +50,11 @@
|
|||
<?php snippet('calendar-strip') ?>
|
||||
|
||||
<?php
|
||||
$orderedSeason = $kirby->collection('ordered-season');
|
||||
$comingEvents = filterFutureEvents($orderedSeason);
|
||||
?>
|
||||
|
||||
<?php
|
||||
snippet('events-grid', ['title' => 'Prochainement', 'events' => $comingEvents->slice(0, 2), 'columns' => 2])
|
||||
snippet('events-grid', ['title' => 'Prochainement', 'events' => $site->events()->toPages(), 'columns' => $site->events()->toPages()->count() === 1 ? 2 : $site->events()->toPages()->count()])
|
||||
?>
|
||||
|
||||
<?php snippet('newsletter-section') ?>
|
||||
|
||||
<?php //snippet('events-grid', ['events' => $comingEvents->slice(2, 3)]) ?>
|
||||
|
||||
<?php snippet('callout') ?>
|
||||
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue