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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DOM Summary Fields


Go to End


2 Posts   2139 Views

Avatar
ciaranhickey

Community Member, 17 Posts

6 August 2010 at 12:31am

Edited: 06/08/2010 12:39am

Hi,

I wondering if it's possible to display only a selection of my fields in the dataobjectmanager list view. I've tried using summary_fields and have tried the approach as suggested here but to no avail...

http://ssorg.bigbird.silverstripe.com/dataobjectmanager-module-forum/show/283243?start=0

static $summary_fields = array(
  'FieldName' => 'Column Name'
);

function summaryFields() {
  return self::$summary_fields;
} 

My main problem is that one of my fields for each item contains quite a lot of text content and so is pushing down each object in my list view in the backend. You can see a screen grab of my issue here, ideally I'd like to hide "Text" column in the listview but have it appear in pop-up.
http://ciaranhickey.com/DOM-screengrab.png

Any help would really be appreciated.

Regards,
Ciarán

Avatar
ciaranhickey

Community Member, 17 Posts

6 August 2010 at 12:46am

Managed to solve this with an obvious solution.

Removed the Field from array of fields in the dataobjectmanager declaration:

new DataObjectManager(
	$this,
	'Employees',
	'ManagementEmployee',
	array('Name' => 'Name', 'Position' => 'Position', 'Location' => 'Location', 'Intro' => 'Intro'),
	'getCMSFields_forPopup'
));

but left it in the getCMSFields_forPopup method.