-1
public function main($content, array $conf) {
$this->conf = $conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$content = '';
$background_image = $this->cObj->parentRecord['data']['media'];
// Wenn ein Bild vorhanden ist
if ($background_image != '') {
$content .= '<img src="uploads/media/'.$background_image.'" alt="" title="" width="100%" />';
}
return $this->pi_wrapInBaseClass($content);
}
のhtmlを期待すると、私は取得していますパス、このように画像の代わりに表示されますPHP 1は
それはように動作理由を理解することだ理由ですので、これは私が書いていません<img src="uploads/media/1" alt="" title="" width="100%">
それそうです。任意のヒントを歓迎します。
'ますprint_r($のbackground_image)' –
かかる場合があり、FALのAPIでこれらの参照を解決する必要があります。 $ background_image = $これを - > cObj-> parentRecord ['data'] ['media']; –
どのTYPO3バージョンですか? –