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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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

Constant DataObject


Go to End


2 Posts   1160 Views

Avatar
Krigu

Community Member, 7 Posts

24 April 2010 at 1:27am

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

Forum Moderator, 5523 Posts

24 April 2010 at 11:31am

Edited: 24/04/2010 11:31am

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