For last hour, I’m trying to debug an error about fetching content from a subpage. I’ve got this folder structure:
Now I’m trying to fetch the content of alert.txt file (there is template and blueprint for that too). The content of alert txt is this:
Title: Herbsturlaub 2021 ---- Specialmessage: Hey da ist was! ---- Datepublish: ---- Dateexpire:
The information should be fetched from anywhere on the site, so I wrote this snippet:
<?php foreach ($site->index()->filterBy('template', '==', 'alert') as $item): ?> <?= $item->specialMessage()->kirbytext() ?> <?php endforeach ?>
And… it doesn’t work. But what definitely bugs me is that I’m using this same snippet in similar fashion for another template, and it’s working fine as intended. May anyone have an idea why fetching won’t work on this example?