Closed tobiasfabian closed 5 years ago
yeah, I thought about that and ended up leaving the tab structure in the page's yaml. If you would have the fields flat like you suggested, you would have problems if fields in different tabs would have the same name. Maybe it would be a solution to detect duplicate names and hint the user inside the panel. However, this could get pretty confusing when you start extending entire tabs from different yaml files.
Yes, but:
Kirby doesn’t save the blueprint tabs structure into the .txt. There is the same problem with fields having the same name. You, as a web developer just have to make sure that every field has a unique name. I think that’s acceptable.
Imagine you build a page with the Page Builder – without tabs. At some time in the future you need three more fields in one fieldset. Now it would be more comfortable for the Editor to have tabs. This would be quite difficult to implement, because if you add tabs the Content structure of the txt files won’t fit anymore.
I would prefer a more strict separation of Panel layout and content structure.
Hey @tobiasfabian,
I just pushed an update that implements your suggestions of a flat content structure that is not affected by tabs.
Currently the structure of the tabs is saved into the page.txt
page.yml
page.txt
I would prefer a flatter structure for the page.txt to separate Panel layout and content. This would allow the admin to remove, add or change tabs after content is already saved.