[TYPO3-project-4-3] Question about magic getters of domain model object
Sebastian Gebhard
s.gebhard at markenmotiv.de
Mon Jun 15 17:02:27 CEST 2009
Hi *,
my domain model object has a field "images" which contains a comma
separated list of images(image names).
I want to show the first image.
In my HTML-Template is used {car.image}
In Tx_Autoadmin_Domain_Model_Car is wrote this:
function getImage(){
//die('x');
$images = explode(',', $this->images);
if(trim($images[0])){
return '<img src="'.$images[0].'" alt="Bild von '.$this->tmp_model.'" />';
}else{
return '';
}
}
It returns nothing even when there is an image. When i activate the
die(), the script runs through, so getImage is not called.
What have i done wrong? Shouldnt {car.image} cause Fluid to call getImage()?
More information about the TYPO3-project-4-3
mailing list