Hi folks,
I’m trying to setup a dashboard on my panel where I can display both posts and pages, but I’m very new to Kirby, so struggling with this a little.
I have my home page set to my blog page in config.php and my posts are obviously children of that blog page. I’ve setup a panel for my blog page that works great, that looks like this:
title: Blog
icon: book
columns:
left:
width: 2/3
sections:
listed:
extends: sections/articles
label: Published Posts
status: listed
right:
width: 1/3
sections:
drafts:
extends: sections/articles
label: Drafts
status: draft
unlisted:
extends: sections/articles
label: Unlisted Posts
status: unlisted
So I put this same snippet of YML into my site.yml file, so it looks like this:
title: Site
columns:
left:
width: 2/3
sections:
listed:
extends: sections/articles
label: Published Posts
status: listed
right:
width: 1/3
sections:
drafts:
extends: sections/articles
label: Drafts
status: draft
unlisted:
extends: sections/articles
label: Unlisted Posts
status: unlisted
pages:
type: pages
label: Published pages
status: listed
It displays ok, but it isn’t showing any of my published blog posts, or drafts. All the sections are just blank. I’m clearly doing something very basic wrong, but I can’t for the life of me work out what that is.
In case it’s needed, here’s the contents of my /sections/articles.yml file:
type: pages
label: Articles
info: "{{ page.published.toDate('d M Y') }}"
template: article
empty: No articles yet
sortBy: date desc
Any help would be greatly appreciated.
Thanks,
Kev