TYPO3: get path out of file reference in Extbase

extbasefluidtypo3

i've created a Custom Content Element with Fluid and Extbase (TYPO3 6.1), in which you can define a picture.
In the picture-settings i can set a img-link, which is targetting a file.

In my Controller i can access this data with

$this->configurationManager->getContentObject();

But i just get a file-reference for this setting and no path. like this:

file:1206

I've googled a lot and i didn't find a solution to access the path. Has anybody a solution or knows maybe a function in the configurationmanager or something else? I've spend hours on this problem…

Thanks a lot!

Best Answer

If you need to get image from FAL than use following image view helper

<f:image src="{object.image_field.uid}" alt="{object.image_field.originalResource.title}" width="640" height="291" treatIdAsReference="1" />

If you just need url of image than use following line

{object.image.originalResource.publicUrl}..

Hurray.

Related Topic