I have been unable to get a thumbnail image for the function below. Maybe there is a better way to write it?
Page.php
...
function GetFiles() {
$id = $this->ID;
$obj = "FileAttach";
$filter = "ArticleID = $id";
$sort = "";
$join = "LEFT JOIN File ON (File.ID = FileAttach.FileID)";
$limit = "";
$data = DataObject::get($obj, $filter, $sort, $join, $limit);
return $data;
}
..
Page.ss
<% control GetFiles %>
$ID $Filename $File.URL // Works as you would expect it to and shows the ID, Filename and URL
$File.CMSThumbnail // Works and shows Icon and Link
$File.SetRatioSize(150,150) // Shows nothing
<% end_control %>