Trying to following the Portfolio Tutorial

Hello there

I try to following the Portfolio Tutorial.

I mananged to get the detailpages and the overview working in the frontend and backend. But i struggle to add my projects to the starting page (panel). I get this error message:
## Invalid section type ("projects")

Somewhat related is the problem that i do not see my parent page for projects on the list of pages.

Do you mean these example blueprints? Portfolio | Kirby CMS

Could you please post what you put into your site.yml blueprint.

And welcome to the forum :slightly_smiling_face:!

Exactly this one. Thanks for the very fast answer.

 title: Site

columns:
  - width: 1/2
    sections:
      albums: sections/albums

  - width: 1/2
    sections:
      notes: sections/notes
      pages:
        type: pages
        create: default
        templates:
          - about
          - home
          - default

Edit: trying to format a codeblock

Hm, the site.yml you posted above is the original one from the Starterkit. I don’t see how that should throw the error you mentioned?

oh, i posted the wrong one. I had both open trying to find my error.

That’s mine:

title: Site

columns:

  - width: 1/2
    sections:
      projects: sections/projects

  - width: 1/2
    sections:
    
      pages:
        type: pages
        create: default
        templates:
          - about
          - home
          - default

Right side is working.

Looks like the type is missing from /site/blueprints/sections/projects.yml, should be:

And the section needs a parent page as well:

type: pages
parent: kirby.page("projects")
headline: Projects
layout: cards
template: project
image:
  query: page.images.template("cover").first
  ratio: 3/2
  cover: true
info: "{{ page.year }}"

You have to create that page in the content folder…

I fixed the example in the docs.

Thank you. Now i see my projects on the panel.

I still do not see it as a page on the right site of the panel. I already have a folder inside content called 1_projects with my projects in it.

The headlline of the section is now a link to the projects page. If you also want to list it in the pages section together with home and about, you have to add the projects template to the list of templates:

 - width: 1/2
    sections:
    
      pages:
        type: pages
        create: default
        templates:
          - about
          - home
          - default
          - projects

Thank you a lot. This worked and even more important i understood why and it makes perfect sense. I really like kirby that far :slight_smile:

1 Like