Jump to:

4944 Posts in 17673 Topics by 1494 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Configurable requireDefaultRecords

Getting SilverStripe up and running on your computer and on your web server.

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

Page: 1
Go to End
Author Topic: 2099 Views
  • Radon
    Avatar
    Community Member
    11 Posts

    Configurable requireDefaultRecords Link to this post

    Hi,
    We have developed a couple of sites on the SilverStripe CMS and have developed quite a few modules where we need to populate the database with default records.

    Most of the sites we are setting up are migrations of existing sites, where we don't want to create the default SiteTree and error page records defined in SiteTree::requireDefaultRecords and ErrorPage::requireDefaultRecords. We can specify dont_populate=1 either in sake or through the web dev/build?dont_populate=1, but that suppresses all default record creation.

    Is there any way to configure the population, or does anyone have an idea on how to solve this problem?

    Can I for example do a dev/build?target=<DataObjectName> in order to build a specific table?

    I made an effort to solve this through decorators ( http://open.silverstripe.org/ticket/4797 ), but that was not well perceived, and I agree with ajshort that it might be overkill.

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Configurable requireDefaultRecords Link to this post

    I would love to know an answer to this too. I would really like to suppress the default records for SiteTree so I create my own site structure, either under Page::requireDefaultRecords or possibly as a build task (although these might not support this, haven't tried yet).

    Cheers,

    Mo

    2099 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.