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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Default /dev/build/ behaviour


Go to End


3 Posts   1353 Views

Avatar
Mo

Community Member, 541 Posts

30 October 2009 at 3:37am

Hi all,

By default, the first time you run /dev/build/, if you are starting with an empty database, default tables are generated, with dummy content.

These are something like:

Home
About us
Contact

I have been wondering if it is possible to alter this behavior so that different pages would be created?

Cheers,

Mo

Avatar
dalesaurus

Community Member, 283 Posts

30 October 2009 at 7:00am

Yes, when build is called it will invoke requireDefaultRecords(). You can override or create this to do stuff with your own models or prevent existing ones from creating those.

See Ecom for an example:
http://svn.silverstripe.com/open/modules/ecommerce/trunk/code/products/Product.php

Avatar
Mo

Community Member, 541 Posts

30 October 2009 at 10:16am

AWESOME!! This will make my life so much easier!

Cheers :).

Mo