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

Constant DataObject


Reply

2 Posts   857 Views

Avatar
Krigu

24 April 2010 at 1:27am Community Member, 7 Posts

Hi

I'm new to SilverStripe and I'm trying to create a Page, which holds several information about different companies. However, the companies are devided into 4 different categories. I would like to add a select box to my form (backend), where you can choose one of the 4 categories.

My idea is to create a DataObject "category" and link the page "company" with it. Now, I don't know where to insert the categories then..

Does anyone has a suggestion?

Thanks

Avatar
Willr

24 April 2010 at 11:31am (Last edited: 24 April 2010 11:31am), Forum Moderator, 5511 Posts

Have a read of tutorial 5. It provides some examples of dealing with objects. By the sounds of it you might need a tablefield for managing categories (or you could use a ModelAdmin instance but that could be over the top).

http://doc.silverstripe.org/doku.php?id=tutorial:5-dataobject-relationship-management