How to add new sections to panel

After consulting many webpages in the Guide and Reference, and in my site files, I am still having trouble finding help with what I understand as a basic task: adding new sections to my panel. I am using the starter kit and see, in my panel, the prefab sections for Photography, Notes, and Page (which contains About and Home). I would like to add more three additional sections, and have created folders in Content (e.g., 4_music, 5_design, 6_writing). I can access the panel for the new sections by typing the URL directly (i.e., /panel/pages/writing). I don’t want to organize my site this way. I want to see all sections–my new ones and the included ones (which I plan to study and adapt)–in the panel. The panel is customizable, but I can’t find instructions. The hints I’ve come across in Kirby documentation often show different code that what I see in my blueprint. I’m not a developer, but I’m also not a dummy!

Where exactly do you want these pages to appear? I guess these pages are supposed to be parent pages which will have children just like the photography and notes pages?

If so, and if you want to show these children also in the dashboard (site.yml), you need to add additional pages sections to this site.yml blueprint.

Here an example that adds a section for the children of `writing` (directly defined in the site.yml without a separate file for the section:

columns:
  - width: 1/2
    sections:
      albums: sections/albums
      writing:
        type: pages
        parent: kirby.page("writing")
        ## more options here to define the look and field of the section

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

For details, see docs:

Yes to your question about parent pages. I would like the presentation, in the panel, of the section “writing” to look like that of “notes.” Your example above doesn’t contain the word writing. Should I substitute that word for photography or notes in the code above? I have tried numerous iterations of the code above and can’t get the panel functioning.

From what I can gather, I need a file named writing.yml in blueprints/pages and another file writing.yml in blueprints/sections. I don’t understand what code should be in these two files, and I don’t understand how to link them to blueprints/site.yml.

I look at pages like Pages section | Kirby CMS and think, yes this is what I’m looking for. Reading 01. What is a pages section makes sense. By the time I get to 03. Section shortcuts, I’m totally lost.

Sorry, yes, the writing section should have parent: kirby.page('writing'). Copied from albums and forgot to replace.

And yes, if your writing parent text file is writing, you might want to have a blueprint writing and a blueprint for the children of writing, unless you want to reuse one of the other blueprints (note.yml) for this purpose.

Not necessarily. As you can see from the writing example I added to site.yml above, you can define the section directly in the blueprint. Having a separate file in /blueprints/sections is useful if you re-use the same section in multiple places.

For example, the /blueprints/sections/notes section is used in the site blueprint and extended three times in the notes.yml blueprint (with different options).

The Starterkit blueprints contain comments about this.

1 Like

This is all good information, texnixe. I will review it today. Thank you so much for your generosity. I’m a self-learner with a lot to learn!