Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » how to set the default parent for all pages of a certain type

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

Page: 1
Go to End
Author Topic: 288 Views
  • longy
    Avatar
    Community Member
    5 Posts

    how to set the default parent for all pages of a certain type Link to this post

    I manage certain types of pages that can not be root and can not have children through ModelAdmin.

    But I should be able to set the parent before creating the page I get an error otherwise.

    how can I set the default parent for all pages of a certain type?

  • zenmonkey
    Avatar
    Community Member
    524 Posts

    Re: how to set the default parent for all pages of a certain type Link to this post

    There was a default parent function before ss3 but it'd no longer there. If it has to a specific page you can manipulate the parent ID in onBeforeWrite. If it has to be a a specific type the way is to specify allowed_children on every page type, listing every page type except the child class.

    I hope allowed parent will work its way into 3.1

    288 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.