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

has_one with a dataobject


Go to End


3 Posts   780 Views

Avatar
Guy Van Bael

Community Member, 61 Posts

29 May 2014 at 2:53am

Hi,

I have a page with a has_one relationship to a dataobject (Page has one instance of the dataobject). The dataobject has multiple db fields.
With a has_many relationship, i display the fields in the cms using gridfield in the getcmsfield section, but i can't find a way to display the fields of the dataobject in a has_one relationship (where there's no need for a gridfield).

Can somebody help me out?

Thanks

Avatar
thomas.paulson

Community Member, 107 Posts

30 May 2014 at 3:56am

Avatar
martimiz

Forum Moderator, 1391 Posts

31 May 2014 at 6:56am

This pickerfield module seems to be able to handle has_one relations: https://github.com/briceburg/silverstripe-pickerfield