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

Constant DataObject


Go to End


2 Posts   1447 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