From the starterkit I’ve integrated the “notes” area to my website - everything works perfectly.
Now I want to use the cover image for the prev/next navigation.
From other pages that I create with other templates, I would like to display the cover image as well.
The cover is listed correctly in all .txt. files (e.g. “Cover: - file://3W6cmG4TE4a3RQAP”).
From the “notes” area, I can only retrieve the cover with this:
Thank you for the explanation. Now I understand the context better.
How can I display the cover from different templates for prev/next navigation? I don’t have a page model for each template. I am also unfortunately not very familiar with page models so far to implement a solution with them. Currently I use two different snippets, which adds additional complexity.
public function cover()
{
return $this->content()->cover()->toFile() ?? $this->image();
}
I removed this code from the page model and added ->toFile() to the template. So the structure is now identical in all my templates and I can retrieve the cover with only one snippet.
However, with your explanation you helped me, so I could locate my problem.