5540 Posts in 1738 Topics by 1224 members
|Go to End|
29 March 2010 at 6:32am
I would like to remove the ability in the Sliverstripe for admin users to creating subpages. Only would like top level pages. Would appreciate if someone could point me in the right direction
13 April 2010 at 8:45pm
put this into your Page class
static $allowed_children = array();
Haven't tested it, but should work
22 April 2010 at 8:23am
> static $allowed_children = array();
This is better than nothing, because if you click the 'Create' button with the restricted page selected, it jumps up a level and selects the parent.
However, if you select the restricted child again, you can add a sub-page.
There is no option in the page type list for 'No page can be created at this level', so I doubt it is possible to prevent a sub-page from being created without CMS enhancements.
An alternative approach would be to define a maximum menu depth somewhere. Is that currently possible?
Either way, it would be a good feature, because it is common that menus that only work to a given depth.
|Go to Top|