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.

General Questions /

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

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

Default /dev/build/ behaviour


Reply


3 Posts   1075 Views

Avatar
Mo

Community Member, 510 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, 510 Posts

30 October 2009 at 10:16am

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

Cheers :).

Mo