Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] usage within TypoScript cObject:IMAGE #7

Open
xerc opened this issue Aug 10, 2020 · 4 comments
Open

[REQ] usage within TypoScript cObject:IMAGE #7

xerc opened this issue Aug 10, 2020 · 4 comments
Assignees

Comments

@xerc
Copy link

xerc commented Aug 10, 2020

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
}
@foppelfb foppelfb self-assigned this Aug 11, 2020
@foppelfb
Copy link
Member

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.

@xerc
Copy link
Author

xerc commented Aug 11, 2020

^^ 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
      }

@dogawaf
Copy link

dogawaf commented Feb 8, 2021

FILES can be replaced with a FLUIDTEMPLATE and a DataProcessor. The template will then use typo3-picture's VH?

@xerc
Copy link
Author

xerc commented Feb 9, 2021

would be better not not use a file based template and extra PHP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants