3341 Posts in 982 Topics by 703 members
|Go to End|
2 July 2009 at 1:12am Last edited: 5 October 2009 11:14pm
I was wondering if it's possible to display a thumbnail of an image in the list overview in a DataObject managed by ModelAdmin.
I've tried casting it but so far without luck.
Any help is appreciated, cheers.
6 July 2009 at 10:09pm
6 July 2009 at 11:44pm
Take a look at this: http://silverstripe.org/general-questions/show/263476?start=0#post263669
5 October 2009 at 11:13pm
simon_w on IRC helped me solve this issue
just add <fieldName>.CMSThumbnail.Tag to $summary_fields and you're set to go.
static $has_one = array(
'TickerImage' => 'Image'
static $summary_fields = array(
9 February 2011 at 4:14am
thanks for this post! helped me out!
11 August 2011 at 4:58pm
I just wanted to add to this in case it will help someone else.
Today I was doing something similar I had the following DataObject:
class Competition extends DataObject
public static $db = array(
'Name' => 'Varchar(255)',
'Start' => 'SSDatetime',
'End' => 'SSDatetime'
public static $summary_fields = array(
public function Duration()
return $this->dbObject('Start')->Full() . ' - ' . $this->dbObject('End')->Full();
The problem was I would get the following error message when visiting the model admin in the CMS:
Error: "Uncaught Exception: Unable to traverse to related object field [Duration] on [Competition]" at line 2492 of /sapphire/core/model/DataObject.php
Turns out to stop this from happening all you need to do is define the searchable_fields, like so:
public static $searchable_fields = array(
Hopefully this will help someone else in my situation
2 November 2011 at 10:42pm
Thank god for you James! That was driving me crazy - I had got a method call to work in $summary_fields before and I couldn't work out why the hell it wouldn't work this time. Seems like a bug to me so I reported it at http://open.silverstripe.org/ticket/6761
13 June 2012 at 2:22am
It looks like this bug you reported is still not resolved yet... I am using 2.4.7
|Go to Top|