Hey everyone,
Im relative new to Kirby and im a bit lost. After updating Kirby 3.1.0 to the latest Kirby (3.3.0) via composer, I got the error in my Browser, that i should use page->listed()
instead of page->visible()
in one of my templates. After changing that, my side together with the panel works just fine.
But now my VSCode is showing some problems inside the Kirby folder.
$this can not be used in static methods.
I downloaded the latest Kirby version and swapped the Kirby folder to update and also tried updating via composer. The error is still there.
Here is the code part i changed, but Im not sure if this has something to do with the appearing error.
<?php $articles = $pages->find('journal')->children()->listed()->flip()->paginate(2) ?>
<?php foreach($articles as $article): ?>
<a id="articleanchor" href=" <?= $article->url() ?>">
<article class="article">
<h2 class="jorunal-article-title"><?= $article->title()->html() ?></h2>
<div class="journal-article-alliteration"><?= $article->alliteration()->kt() ?></div>
<figure class="cover">
<?php if ($cover = $article->cover()->toFile()): ?>
<img src="<?= $cover->url() ?>" alt="<?= $cover->alt() ?>">
</figure>
<?php endif ?>
<div class="journal-article-intro"><?= $article->intro()->cover()->kt() ?></div>
</article>
</a>
<?php endforeach ?>
Thanks for your help.