[TYPO3-dev] Problem fetching FAL-FileReference via Extbase

Michael Bakonyi kontakt at mb-neuemedien.de
Mon Jul 29 13:51:09 CEST 2013


Am 29.07.13 11:48, schrieb Frans Saris:
> Hi Michael,
>
> because as Helmut mentioned the originalResource is loaded in the
> getOriginalResource() function. When you debug "file"  you see only the
> properties of file. When you debug "file.originalResource" you get the
> response of file->getOriginalResource() thats the magic of Fluid :)

Aaah, it's not a bug – it's a feature! ;) Thx for your explanation!

>
> I presume when debug "file" after the line where you use
> "file.originalResource"
> the "originalResource" will be a object.

You're right.

Btw. now that FAL is there wouldn't it make sense to have an additional 
link-viewhelper for files which takes config.absRefPrefix, 
config.baseUrl the url_scheme etc. into account?

Cheers,
Michael

>
> gr. Frans
>
>
> 2013/7/29 Michael Bakonyi <kontakt at mb-neuemedien.de>
>
>> Hi Helmut,
>>
>> Am 29.07.13 09:34, schrieb Helmut Hummel:
>>
>>   Try
>>>
>>> {file.originalResource.**identifier} or
>>> {file.originalResource.**originalFile.identifier}
>>>
>>> instead of
>>>
>>> {file.originalFile.identifier}
>>>
>>
>> uhm, okay this is working now – but honestly I don't understand why ...
>> How is it possible that debugging "file" says "originalResource" is NULL
>> but if I debug "file.originalResource" it returns an object?
>>
>> Cheers,
>> Michael
>>
>>
>> ______________________________**_________________
>> TYPO3-dev mailing list
>> TYPO3-dev at lists.typo3.org
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-dev<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev>
>>




More information about the TYPO3-dev mailing list