0

In my custom extension I introduced a binary variable to the image metadata that needs to be read, similar to the "Show in list view" of tx_news.

With tx_news as example I was able to add the variable, the new palette shows the checkbox in the backend and the selection is registered in a new database field in the sys_file_reference table ...

I first tried to declare it in the domain which did work but I could not use the variable since it was an array of the same files in which I tried to use it, calling it within a loop broke the loop ... (this was my question)

now I need to use this new variable in my fluid template, if I loop trough the items the new variable named opentab is visible if I debug like this:

<f:for each="{object.items}" as="item" iteration="iteration">
<f:debug>{item.originalResource}</f:debug>

# debug result
TYPO3\CMS\Core\Resource\FileReferenceprototypeobject
   propertiesOfFileReference => array(36 items)
   uidOfFileReference => NULL
   name => NULL
   originalFile => TYPO3\CMS\Core\Resource\Fileprototypeobject
   mergedProperties => array(empty)

propertiesOfFileReference has "title" which I can use like this {item.originalResource.title}

in propertiesOfFileReference I see "opentab" with its correct value but I found no way to use it !!!

webman
  • 1,117
  • 15
  • 41

1 Answers1

1

Use {item.originalResource.properties.opentab}

minifranske
  • 1,295
  • 6
  • 12
  • thank you, is there any refference on these FAL arrays ? – webman Nov 07 '17 at 14:27
  • `{item.originalResource.properties}` This is kind of a dynamic array. It is filled by all properties of `sys_file_reference` merged with properties of `sys_file` and `sys_file_metadata`. So a reference would be you `TCA` of those tables. Think we should add some info to https://docs.typo3.org/typo3cms/FileAbstractionLayerReference/UsingFal/Frontend/Index.html#fluid Could you maybe add some info about this to the docs? :) – minifranske Nov 07 '17 at 14:36
  • ik ben een 'beginner' ... although I have been working with TYPO3 for a while now, I'm still pretty confused, I go a lot by trial and error ... that is not really a vision but yes, that page is pretty concise and could definately do with more info. – webman Nov 07 '17 at 16:04