Hi,
I just got started switching from working with Kirby 2 to Kirby 3. To practice, I started working on a small, simple portfolio site, but I’m running into a strange issue when trying to set up a »Projects« page.
Note: I’m basing most of my blueprints on the Kirby 3 Starterkit, because it comes with a lot of handy things.
The blueprint for my »Projects« page look like this:
title: Projects
icon: 📷
sections:
projects:
type: pages
headline: Published Projects
size: tiny
info: "{{ page.images.count }} image(s)"
layout: cards
template: project
empty: No projects yet
image:
query: page.cover
cover: true
ratio: 5/4
Notice how I am using the page.cover
query from the Starterkit albums.yml
blueprint.
The corresponding »Project« blueprint looks like this:
title: Project
icon: 🎆
status:
draft: true
listed: true
columns:
- width: 2/3
sections:
images:
type: files
layout: cards
template: image
info: "{{ file.dimensions }}"
image:
ratio: 5/4
cover: true
min: 0
size: small
- width: 1/3
fields:
cover:
type: files
multiple: false
headline:
type: text
description:
type: textarea
tags: true
Again, this is pretty much a copy of the Starterkit’s album.yml
.
However, when I create a project page (as a subpage of »Projects«) a couple things from the blueprint fail to work. 1) The cover image is not being displayed (instead its just the icon defined in the blueprint) and 2) the empty
text defined in the blueprint does not show up in the section (instead it just says »No pages yet«).
When there are no projects yet, the empty text should say »No projects yet«
An image is uploaded to the project + set to be this project’s cover…
…but it does not show up in the section of the project’s parent.
However, and this confuses me, when I set the template for the pages of »Projects« to album
and rename project.yml
into album.yml
, the cover shows up just fine:
Can someone help me understand what is going on here and why renaming my blueprint to »album« instead of »project« fixes the cover issue?