as i've been struggling with this issue in each and every silverstripe-project by now, und just stumbled upon it again in my recent one, i'd like to open another thread on this topic, hoping for some enlighting response - or just for some feedback of others having the same problem.
i've read every thread on this, and the point is: $allowed_children as well as $can_be_root are buggy to non-existent in cms.
- setting $allowed_children leads to the following behaviour in cms: when i select a pagetype type in the 'create' dropdown which is not allowed, the focus inside the sitetree moves to the root ('Site Content'), so when i click 'go', a page is created under the site root.
try to explain this to a client!
in my opinion, all pagetypes no included in $allowed_children should simply not be available in the create dropdown?
- for the root in the sitetree ('Site Content'), it is not even possible to set 'allowed_children'.
- $can_be_root does simply... nothing.
i think of this as an important usability issue, as a cluttered 'create' dropdown leaves the client alone in which pagetype to choose.
there are some hacks to make the best of this (for example, using the can_create function to allow only one instance of a page type), but shouldn't this be an important feature on the roadmap? to me, it's one of the last missing features to the otherwise very thought-out cms.
or am i completely wrong and there already is a simple solution to this?
any feedback is much appreciated!
max
[sorry for the cross-post, originally i posted this in the 'all other modules' forum where it definitely does not belong]