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
pages:
template: project
to
pages: false
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.
[added:]
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.
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).
Seems that 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.
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.