Out of moves debugging this plugin. [K5 php8.3]
Config following the plugin docs.
config/config.php
'konzentrik.calendarview' => [
'licenseKey' => 'XXXXXXXXXXXXXXX',
'secret' => 'artevents',
'timezone' => 'Australia/Sydney',
'dateField' => 'date',
'dateEndField' => 'dateend',
'collections' => [
'events',
],
],
/collections/events.php
return function ($site) {
return $site->find('events')->children()->listed();
};
/debug test
],
'routes' => [
[
'pattern' => 'debug/events.json',
'action' => function () {
$events = site()->find('events')->children()->listed();
return [
'count' => $events->count(),
'fields' => ['title', 'date', 'dateend', 'venue', 'short'],
'events' => $events->map(function($event) {
return [
'title' => $event->title()->value(),
'date' => $event->date()->value(),
'dateend' => $event->dateend()->value(),
'venue' => $event->venue()->value(),
'short' => $event->short()->value(),
'id' => $event->id(),
'slug' => $event->slug(),
];
})
];
}
],
delivers a list of events to json.
Any ideas?