I have installed the calendar plugin and can display events on the initial calendar page. I would like to call the calendar-teaser snippet on additional pages. I am new to both Kirby and to PHP, so I am guessing but I think I may need to provide a path to the calendar.en.txt content? Here is the code I am working with:
<section id="e_cal">
<?php $calendar = calendar($page->calendar()->yaml()); ?>
<?php snippet('calendar-teaser', array(
'items' => 2,
'calendar' => $calendar,
'fields' => array(
'summary' => l::get('title'),
'description' => l::get('description')
)
));
?>
</section>
This works from within the calendar template, but not outside of that. It doesn’t throw errors and creates the expected ul tag, but no events display. Here is the resulting HTML:
<section id="e_cal">
<ul class="teaser">
</ul>
</section>