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

Which field type to use for a single dataobject relation?


Go to End


3 Posts   850 Views

Avatar
lkossis

Community Member, 1 Post

15 May 2015 at 7:23pm

Hello -

I want to be able to link a single DataObject to a page:

Song <- AudioFile

I'm using an AudioFile DataObject because I want to store additional information about the file, but also so that I can aggregate AudioFile DataObjects and use them in other parts of the site.

I am perfectly clear as to how you can go about adding multiple DataObjects to a page using GridField. However, is there a way to add an interface for adding a single DataObject without having to build a whole table for it?

Thanks!

Avatar
Pyromanik

Community Member, 419 Posts

19 May 2015 at 8:43pm

Avatar
sagarverma

Community Member, 3 Posts

24 May 2015 at 12:27am

Thanks for providing the help