[TYPO3-dev] File reference using Extbase/Fluid/FAL and backwards compatibility

Dennis Luemkemann dennis.luemkemann at gmx.de
Wed Dec 18 10:34:12 CET 2013


Hello Frans & all,

now I'm creating a version of my extension for 4.5, basically backporting it. Turns out that the old Fluid doesn't support treatIdAsReference in the f:image tag, which breaks my templates. What would be the right syntax for older Fluid to get the image to render? Just using

<f:image src="{visit.image1}" />

gives me the file name, but without the path. How can I get the path?

Thanks
Dennis

Am 12.11.2013 um 23:05 schrieb Dennis Luemkemann <dennis.luemkemann at gmx.de>:

> Frans,
> 
>>   public function getImage1() {
>>       return $this->image1;
>>   }
>> Should be enough.
> 
> that's what I thought, but then I copy&pasted the code from the wiki article.
> 
>> And then in fluid
>> 
>> <f:image src="{object.image1.uid}"  width="200" treatIdAsReference="1"/>
> 
> adding treatIdAsReference="1" solved the problem. Somehow I must have overlooked that.
> 
>> Maybe you can use this working example as reference. Are multiple
>> references instead of one.
>> https://github.com/fsaris/newsfal
> 
> I'll have a look.
> 
> Thank you for your help!
> Dennis
> 
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev




More information about the TYPO3-dev mailing list