Hi I Use DataObjectManager Modul
And I create a realy simple Gallery, and everything works perfect, but now i want to make some kind of Holder lets say a KatalogImageHolder.php where the children are KatalogImagePage, where I want to show only the first Image of the KatalogImagePage. And I have no Idea how can I do that stuff :) (I Know this is not so really appended from DataObjectManager Modul)
Please Help me to get it work
KatalogImageHolder.php looks like this
class KatalogImageHolder extends Page {
static $db = array(
);
static $has_one = array(
);
static $allowed_children = array('KatalogImagePage');
}
….
and KatalogImagePage.php like this
class KatalogImagePage extends Page
{
static $has_many = array (
'KatalogImages' => 'KatalogImage'
);
// Here go, I don't know how to make it run,
public function getFirstPhoto(){
return $this->KatalogImages[0]; //that doesn't work :)
}
...
@UncleCheese. My Post has been duplicated, please delete one of them