Panel tabs and page's nesting hierarchy / coupled/decoupled content & panel structure

I really like how tabs allows you to separate content by ‘type’… for example “works” and “venues” or “info”, while still giving direct access to the user, without subpage levels plus giving the user a great, semantic, landing panel page. Such as in this DIETZ website panel (no license because localhost :wink: ):

Before tabs I would have probably made “works”, “venues” and “info” subpages, with their own children if necessary, such as “work” or “venue”, which adds an extra level, and makes the landing panel page less interesting/direct.

But of course the crucial difference is that tabs do not create folder structures, right ? If “works” and “venues” are tabs, their children pages (“work” and “venue”) are found in the root content folder, and we need to filter them by template, both in the panel and in templates.

While I love tabs, I find it dirty and often annoying to see all those folders stored in the content folder directly. If I happen to have to look at the content folder (even at editor’s sidebar), or even manually manipulate it, I don’t have a fast way to see which folders belong to which templates.

The same or worse happens to files that are uploaded directly into a tab, such as a “media” tab, which we use often.

So, for folder structure I surely prefer subpages… but then the user has to click on “works” or “venues” to go down an unnecesary level, instead of being able to show each group of subpages and venues directly in tabs.

I know this may seem like… or even clearly be merely an unconsequential preference. But I have to say that tab-separated content type looks really good, is clear and feels direct… much more than traditional pages.

I also know pagesdisplay solves this, kind of… but it lacks the crucial ability to add pages to the displayed collection… (hence pagesDISPLAY)… I don’t know if this is something chosen or imposed by kirby limitations.

So in the end this boils down to panel structure VS content folder structure. Does it have to be coupled ? as in a system subfolder being always represented as a subpage in the panel ?

I do see how decoupling can lead to problems, seems clearer to keep subfolder/subpages coupled between system and panel, but I still would love to use tabs AND create subfolders, without subpages in the panel.

Is this possible? Any ideas ?

Thank you

The Startkit is a good example of a dashboard where you can directly add pages to both the notes and photography parent pages. Instead of putting them into the same tab, you could put those sections into different tabs, so I don’t really see why your pages all have to end up on the content root level.

Also images/files can be assigned a parent (e.g. a dedicated media page), so they also don’t have to end up cluttering the content root. You could even build a subpage structure inside a media folder to further diversify files (by type, template etc.)

1 Like

Ah I see this is done with the “parent” option on the “pages” section. That is great, I did not know about it.

Thank you :slight_smile:

Given that you are not new to Kirby, I’m really wondering where the documentation/the examples are lacking detail? Where would you have expected this information?

I think at some point I assumed this was not possible, I even recall, and was looking for a forum post that complained about this particular thing.

So I did not even thought about looking for this option in the docs, which is quite silly considering I went and started reading pagesdisplay code

Once you pointed out at Starterkit, I looked at the code and of course found the option easily in the docs. So I don’t believe the docs are at fault here. Let’s call it a human bug :slight_smile: ?

I will make sure to go look at the docs next time, even if I am sure the thing is not possible

Thank you very much.

1 Like

I would like to add that there is a drawback to using “parent” option on pages to display the children of a subpage in the homepage of panel as if they were direct children of “site”.

When the user access one of these children pages, say “work”, the panel breadcrumb shows the full path, say Site / Works / This Work.

To avoid confusion for the user, who expects to access Works from Site/ (panel homepage) and not from Site / Works we may do two things:

  1. Duplicate, in Site / Works whatever is in Site /(panel homepage).

This works for a simple pages section, but not for other fields, such as a tags field or any field that wont’ share its contents across subfolders.

  1. Show NO fields in Site / Works and perhaps a redirection, such as:


But this is… dirty… specially if the user tends to reach this page.

I assume it is not reccomendable, and that there is no easy way to not show Works in the breadcrumb or any other solution for this conundrum. In the end I either accept to put everything directly in the content folder, or I dismiss tabs and parent and accept to reproduce the content folder structure in my panel, as in I show ‘Works’ as a subpage in a pages section in panel homepage, and force the user to click there to access the Works.

Perhaps this is something that Fiber can already solve ?

Same question has been asked here before: Panel redirection for an empty page - #4 by efavaro

1 Like