My dev website runs on win10-XAMPP and uses the demo content from https://github.com/getkirby/starterkit with Kirby 2.2.3.
I want to change all the contents e.g. of the path
/projects using the panel and to avoid, that any (new) sub pages can be added using the panel. But all existing subpages (currently: Project A, Project B and Project C) should remain editable, especially if they are created or updated via FTP.
It may be that there should be no subpages of the path
/projects in the future.
If I change
in the blueprint
\site\blueprints\projects.php, no (existing) subpages are displayed in the panel
/panel/pages/projects/edit on the left.
I think this “not showing of existing subpages” is an error, no matter what is in the blueprint.
It depends on the code, whether these old subpages are visible in the website (frontend) any more or not.
But we cannot control that in the panel, which is the backend for all editors and admins, if they have no FTP access to the webserver.
No, this is not a bug; for what you want to achieve, you can limit the number of subpages:
pages: false setting is made to not allow subpages, not even ones that were created before.
Yes, I know, but
does not work (if no subpages of the path /projects should be there in the future).
If you are correct with:
then it is not possible to edit or delete these old subpages in the panel.
Then it depends on the code, whether these old subpages are visible in the website (frontend).
If you want to keep the three existing page but disallow adding more pages, you have to set
No, it may be that there should be no subpages of the path /projects in the future and so
If my error is solved, nobody should have a problem.
max: x does not work in my install at all, so I can’t test this.
Edit: Ok, I tested this in a fresh install, and
max:0 has the same effect as
pages: false, so no pages are shown in the panel. But that’s exactly the behavior I would expect from that setting, I don’t regard this as an error.
And I don’t quite understand what you want to achieve. What you outlined above is that you want the existing pages to be editable but the user should not be allowed to add more pages. Then it makes sense to set the max number to 3, which is the existing number.
Why should there suddenly be no subpages at all?
My client of the real website wants this.
As I said, I don’t understand the issue. Maybe you can explain this in a bit more detail. Do you mean, that when subpages are deleted, adding more pages should be disallowed, even though the maximum number is 3?
IMHO, it does not make sense to change the behavior of the max or pages settings, because they are logical. You would then probably need a new validator to check whatever it is you want to achieve.
As I said:
I think this “not showing of existing subpages” is the main error, no matter what is in the blueprint.
At the moment we cannot control that in the panel, which is the backend for all
editors and admins, if they have no FTP access to the webserver, if the blueprint shows:
No, this is definitely not an error, it is the way the panel works and I think, it is logical. If a page is not allowed to have subpages or to only have a limited number of subpages, then there should be no pages at all or only a max number of subpages no matter if you add pages via the file system or not.
Otherwise, you would probably need another type of setting, which would allow you to hide the “add pages” button rather than trying to set this via the subpages setting.
I created a feature request issue on GitHub. But as @texnixe said, this is a new feature and not a bug.
@texnixe and @lukasbestle:
thank you very much.
There has been a team discussion in the GitHub issue. Does the proposed solution solve your issue?