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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DOM Summary Fields


Reply

2 Posts   1394 Views

Avatar
ciaranhickey

6 August 2010 at 12:31am (Last edited: 6 August 2010 12:39am), Community Member, 17 Posts

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...

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

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.
[url]http://ciaranhickey.com/DOM-screengrab.png[/url]

Any help would really be appreciated.

Regards,
Ciarán

Avatar
ciaranhickey

6 August 2010 at 12:46am Community Member, 17 Posts

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.