Help with site structure / blueprints

Hey all, Kirby newbie here… loving it so far, it’s great to work with. I was hoping someone might be able to help me out with the structure / blueprints for my site, the structure I’d like to try and achieve looks something like this:

  • Home
  • About
  • Projects
    • Work (has no index)
      • Project 1
      • Project 2
    • Side projects (has no index)
      • Project 1
      • Project 2
    • Graveyard (has no index)
      • Project 1
      • Project 2
  • Writing
    • Post 1
    • Post 2

The part that I’m struggling with is around projects and the child structure within that.

There are some fields that would apply to all the children in projects (title & excerpt), then there are some that are specific to those different areas, I’m not sure how to structure my blueprints to achieve this (or if that’s even possible)?

You mean work, side projects and graveyard? You can either use different blueprints for those pages or use the same blueprint and leave some fields blank or depending on some condition (using the when property, see Fields | Kirby CMS).

I’d also make this depended on whether the grandchildren ( the project-1 etc) pages can use the same blueprint.

So basically it boils down to how different these setups will be in the end.

And welcome to Kirby and our forum :wave:

Wow, didn’t expect such a quick response on here, thanks :slight_smile:

Sorry, I did a terrible job of describing what I’m trying to achieve, but you’re right, all children of Projects, regardless of their parent would have the following fields:

  • Title
  • Excerpt

Then there would be certain fields that are available depending on which parent they have, for example ‘posts’ that have a parent of Work would have:

  • Thumbnail
  • Colour

Posts with a parent of graveyard have:

  • URL field

The title is automatically part of every page and not defined in the blueprint.

Ok, so we are talking about the single projects, not the parent pages.

This is not a condition that can be queried directly within such a when condition, although there are certain workarounds to achieve that by setting hidden fields with values via hooks.

If those are the only differences, then I’d probably use the same blueprints and leave fields blank if they don’t apply, unless you want to require them. In that case, different blueprints are probably your best bet.

Ah yes, this makes sense. I guess different blueprints for work, side-projects and graveyard would probably work best for me.

It sounds like the relationship between projects and then work, side-projects and graveyard is kind of redundant as that comes from how I write that into my template? The only reason I was thinking about it this was is because I’d like to show the collections for each of those grouped together under the Project page in the Panel, but from what I’ve seen I can customise that page to call in those collections anyway?

If you use different blueprints for those different grandchildren subpages, then you can in fact separate them in the Panel by blueprint (a pages section with a particular blueprint) without the need of having to use the tree structure with parent pages for works, graveyard etc. But that totally depends what works best for you and the project.