21301 Posts in 5736 Topics by 2603 members
| Go to End | ||
| Author | Topic: | 4056 Views |
-
Re: ModelAdmin $summary_fields image width

2 October 2009 at 8:18pm
Problem is, the link you provided contains information about DataObjectManager instead of ModelAdmin (which this thread is about).
I keep ending up with "Unable to traverse to related object field"
So any other thoughts? -
Re: ModelAdmin $summary_fields image width

27 November 2009 at 8:13pm
Hi
This works fine for me.
static $has_one = array(
'Advertiser' => 'Advertiser',
'AdvertImage' => 'FittedImage',
);
static $searchable_fields = array(
'TargetURL' => 'ExactMatchFilter',
'Title' => 'ExactMatchFilter',
);
static $summary_fields = array(
'TargetURL',
'AdvertImageThumbnail',
'Title',
'ToolTipTitle',
);
public function AdvertImageThumbnail() {
return $this->AdvertImage()->CMSThumbnail();
}ta
-
Re: ModelAdmin $summary_fields image width

28 November 2009 at 4:04am
Found the solution to my problem on IRC:
http://silverstripe.org/data-model-questions/show/263751#post263751
| 4056 Views | ||
| Go to Top |


