[REQ] usage within TypoScript cObject:IMAGE
xerc opened this issue · comments
is it possible to use this EXT with IMAGE
temp.teaser = IMAGE
temp.teaser {
file.import.dataWrap = {file:current:storage}:{file:current:identifier}
file.crop.data = file:current:crop
#magic
}
I will check this deeper, but as a first response: not in the way the example is written, as this reads a sys_file, and the extension is solely based on sys_file_references. But IMAGE uses imgResource which can read sys_file_references. Another route might be using the FILES cObject, which again can read sys_file_references. I will try to check this.
^^ was only a snipped // this is be the full impl.
temp.teaser = FILES
temp.teaser {
references {
table = pages
fieldName = media
data = levelmedia:-1
treatIdAsReference = 1
}
maxItems = 1
renderObj = CASE
renderObj {
key.data = file:current:extension
svg = TEXT
svg.data = file:current:publicUrl
default = IMAGE
default {
file.import.dataWrap = {file:current:storage}:{file:current:identifier}
file.crop.data = file:current:crop
}
FILES can be replaced with a FLUIDTEMPLATE and a DataProcessor. The template will then use typo3-picture's VH?
would be better not not use a file based template and extra PHP