[TYPO3-core] $GLOBALS['TSFE']->page using relative path to /uploads/media/ in media field instead of references

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Oct 2 10:10:50 CEST 2013


Hi Patrick,

fileReferenceUids was added not long ago (in 6.2alpha3):

http://forge.typo3.org/issues/49535

I would also endorse some easy and standard way of rendering FAL images
with the "IMAGE" cObject, and have that documented accordingly. At least
we should stop describing "old school" ways of doing it in the
documentation, regardless how "ugly" the code is that has to deal with
the backwards compatibility of it.

Same goes for "imgResource" function and the "resource" data type, which
needs to have improved and up-to-date information about how to deal with
FAL.

Cheers,
Ernesto

Patrick Broens schrieb am 01.10.2013 15:13:
> Hi,
> 
> By some further investigation, I've stumbled over
> TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService. There
> some fields are added, based on the old name. For pages two fields are
> added, "media_fileReferenceUids" and "media_fileUids", which can be
> used. In the comments backwards compatibility is mentioned.
> 
> Seems I've overlooked this while debugging.
> 
> Sorry for the hassle
> 
> Patrick
> 
> On 1-10-13 14:27 , Patrick Broens wrote:
>> Hi Francois,
>>
>> IMHO IMAGE is for a single image, FILES is for multiple coming from
>> files, references, collections or folders. FILES is using IMAGE as well
>> for rendering a single image. Why should I use files, when it should be
>> possible by doing so with IMAGE standalone. That's TypoScript overhead.
>>
>> I could not explain to my users that you need to use FILES for a single
>> image, while the IMAGE content object is around.
>>
>> Even the FAL docs on the Wiki are referring to the IMAGE object [1].
>>
>> And as shown, the second TypoScript part does what you expect. Only the
>> first one does not because the file path and names are in the media field.
>>
>> Patrick
>>
>> [1]
>> http://wiki.typo3.org/File_Abstraction_Layer#How_to_use_.22levelmedia.22_with_6.x_.3F
>>
>> On 1-10-13 14:06 , François Suter wrote:
>>> Hi Patrick,
>>>
>>>> elements.image = IMAGE
>>>> elements.image {
>>>>      file {
>>>>          import =/uploads/media/
>>>>          import {
>>>>              data = field:media
>>>>              listNum = 0
>>>>          }
>>>>      }
>>>> }
>>>
>>> But with FAL you're supposed to use the new FILES object for rendering.
>>> See:
>>> http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Files/Index.html
>>>
>>>
>>> HTH
>>>
>>
>>
> 
> 



More information about the TYPO3-team-core mailing list