In my page I have a page type project that I need to display both in a “CV” section as well as a “Calendar” section. So I thought I create a unlisted page “Projects” where in the panel these projects of type project can be created.
So, I created the bluprint .yml files projects.yml as well as project.yml, created a projects folder in the contents folder with a projects.txt file as well as some test subfolders each with a project.txt file in it.
My problem is, in my projects page in the panel, in the projects section I get this error:
The section "projects" could not be loaded: Illegal offset type in isset or empty
I have no idea, what I did wrong.
The content of my projects.yml is simply:
The error is caused by your sections in the project.yml blueprint. You define two fields sections but the fields keyword is missing:
right:
width: 1/2
sections:
content:
type: fields
fields: # this keyword is missing in your code above in both fields sections
title:
type: text
text:
type: textarea
I’d set a template property in projects.yml as well, to make sure that only subpages with the project.yml template can be created.
sections:
projects:
type: pages
templates: project # this allows only a single template for your subpages
@texnixe: Might I kindly suggest for an error like that to come along with a more meaningful error message? Would probably help beginners like me, because with an error message like that I don’t even know where to look for the error. Thank you.