I have a file collection with LibreOffice Documents. For every Document there is metadata file in json format with same file name.
I building a DCE that iterates through the file collection and shows links to Documents and the metadata of.
So I want to read the json string from the accompanying json file, because Format / Json / DecodeViewHelper takes a json string.
I can't find any viewhelper, that extracts a string from a given text file. Do I have to write a custom viewhelper that takes a file reference and spits out the containing string?
thanx in advance,
siepmannj
There is no default ViewHelper for reading the content of a file and returning it. You could however do this with TypoScript and the
f:cObject
ViewHelper.Your TypoScript would be something like:
And in your template: