Hi there!
I’m trying to get this Calendar Plugin to work and I feel i’m almost there but currently I’m stuck.
Somehow the content I provide through the calendar Blueprint doesn’t show on the website. It displays There currently are no events. which means it works, but not as intended I guess
- I know I have installed the Plugin correctly
- I included
<?php date_default_timezone_set('Europe/Berlin'); ?>
in the head snippet - I set up a blueprint for the calendar events (see below)
- I referred to the calendar snippet and included the calendar object (see below)
What am I missing? Any help would be greatly appreciated
Cheers
Calendar template
<?php snippet('header') ?>
<?php snippet('intro') ?>
<?php $calendar = new Mzur\KirbyCalendar\Calendar($page->calendar()->yaml()); ?>
<?php
snippet('calendar-div', [
'calendar' => $calendar,
'fields' => [
'summary' => t('title'),
'description' => t('description'),
'_begin_date' => t('Start date')
]
]);
?>
<?php snippet('footer') ?>
Blueprint
title: Events
fields:
title:
label: Title
type: text
readonly: true
events:
label: Events
type: structure
sortBy: _begin_date asc
fields:
_begin_date:
label: Start date
type: date
display: DD.MM.YYYY
required: true
_begin_time:
label: Start time
type: time
interval: 15
required: false
_end_date:
label: End date
type: date
display: DD.MM.YYYY
required: false
_end_time:
label: End time
type: time
interval: 15
required: false
summary:
label: Title
type: text
required: true
description:
label: Description
type: text
required: false