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.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

[solved] SS3 Model Admin for Data Object Summary


Go to End


2 Posts   1469 Views

Avatar
Graphicator

Community Member, 62 Posts

17 August 2012 at 5:43pm

Edited: 17/08/2012 5:44pm

I'm having issues getting the dot-notation working for a has_one of a Page.

class Testimonial extends DataObject {
	
	public static $db = array(
		'Title' => 'Varchar(255)',
		'Quote' => 'HTMLText',
		'Tagline' => 'Varchar(255)',
		'SortOrder' => 'Varchar(255)'
	);
	
	public static $has_one = array(
		'BookPage' => 'BookPage',
		'Image' => 'Image'
	);
	
	public static $summary_fields = array(
		'BookPage.Name',
		'Title',
		'Quote',
		'Tagline'
	);

And the BookPage is a class that extends 'Page'

The BookPage.Name doesn't work in my SS3 setup. To be clear, I'm trying to view the BookPage Column so I know which page ("Book") has the testimonial.

Avatar
Graphicator

Community Member, 62 Posts

17 August 2012 at 9:24pm

Edited: 17/08/2012 9:25pm

I jumped off the github version and grabbed Silverstripe's stable download to get things working for my summary fields. It looks like I'll be staying with stable releases from now on.