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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

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

$can_be_root


Go to End


4 Posts   2762 Views

Avatar
gakenny

Community Member, 153 Posts

6 October 2007 at 8:11pm

Hello,

I am trying to enforce certain page types that can only occur as children of others. For example, I have DateHolder and DatePage. Under DatePage, I have added 'static $can_be_root = false;' under 'static $has_one = array();'. However, I am still able to create a DatePage under Site Content in the hierarchy.

Cheers,

Gary

Avatar
blueskies

Community Member, 44 Posts

16 April 2008 at 2:54am

I'm having the same problem, and still ahven't found an answer... just subscribing to your post in case someone knows how to solve it :-)

Avatar
bummzack

Community Member, 904 Posts

3 August 2008 at 10:10pm

Same problem here. Subscribe

Avatar
Willr

Forum Moderator, 5523 Posts

3 August 2008 at 11:22pm

Im pretty sure the can be root is a work in progress / feature that never really got completed! I will check it out