0

Using Fluid Template with tx_news, I need to get the URL of uploaded FAL video.

Currently I have this:

{newsItem.falMedia.0}

Which prints:

GeorgRinger\News\Domain\Model\FileReference:3

I want the output:

fileadmin/user_upload/MyVideo.mp4
johndoe33
  • 444
  • 6
  • 25

2 Answers2

1

newsItem.falMedia seems to be an ObjectStorage. With .0 you are pointing to the first object of it - not any function of it. In the API you can see its functions http://api.typo3.org/typo3cms/current/html/class_t_y_p_o3_1_1_c_m_s_1_1_core_1_1_resource_1_1_file_reference.html or you can debug it in Fluid by using {newsItem.falMedia.0}

Example: {newsItem.falMedia.0.publicUrl} should give you the public path to the file.

Paul Beck
  • 2,675
  • 1
  • 12
  • 14
0

If you just need url of image than use following line

{object.image.originalResource.publicUrl}..

TYPO3: get path out of file reference in Extbase

Please refer above link.

Community
  • 1
  • 1
Vivek Parmar
  • 773
  • 1
  • 10
  • 26