Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

disable subpage creation

Go to End

3 Posts   1574 Views

holy noli

Community Member, 6 Posts

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

thank you


Forum Moderator, 801 Posts

13 April 2010 at 8:45pm

put this into your Page class

static $allowed_children = array();

Haven't tested it, but should work :)


Community Member, 102 Posts

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.