newb:typo3 访问用打字稿上传的图像

发布于 2024-12-27 09:01:04 字数 886 浏览 2 评论 0原文

我正在尝试做类似 本教程,一个非常基本的画廊。
在 Tut 的示例中,他们从 uploads/media/ 加载图像,

page.10.marks.PROJECTTHUMBNAIL = IMG_RESOURCE
page.10.marks.PROJECTTHUMBNAIL {
  stdWrap.wrap = <img src="|" />
  file {
    import = uploads/media/
    import.data = levelmedia: -1,slide  
    import.listNum = 0      
  }
}

但现在我想加载已在 image-cObject 中上传的图片。

这是一个令人尴尬的问题,但我两天来一直在试图解决这个问题,但我似乎无法得到正确的答案-.-我确信那里有很多答案...我只是不知道知道在谷歌中输入的魔法词来找到它们 TT

我尝试了非常基本的东西,比如只做与上面相同的事情,但使用不同的路径,我翻遍了 IMAGETSRef > 和IMG_RESOURCE,尝试摆弄CONTENT,并尝试调整typoscript对象中的tt_content.image.20 = USER(?? Oo)描述-浏览器...但一切都无济于事,因为我对自己在做什么知之甚少-.-

任何朝正确方向的推动都将非常表示赞赏!

I'm trying to do something like in this Tutorial, a very basic gallery.
In the example of the Tut they load images from uploads/media/ like so

page.10.marks.PROJECTTHUMBNAIL = IMG_RESOURCE
page.10.marks.PROJECTTHUMBNAIL {
  stdWrap.wrap = <img src="|" />
  file {
    import = uploads/media/
    import.data = levelmedia: -1,slide  
    import.listNum = 0      
  }
}

but now I want to load pictures that have been uploaded in an image-cObject.

This is an embarrassing question but I've been trying to figure this out for two days and I can't seem to get it right -.- I'm sure there are lots of answers out there... I just don't know the magic words to put into google to FIND them T-T

I tried very basic stuff like just doing the same as above but with a different path, I rummaged through the TSRef of IMAGE and IMG_RESOURCE, tried fiddling with CONTENT, and tried to adapt the tt_content.image.20 = USER (?? O.o) description in the typoscript object-browser... but all to no avail, as I know so little what I'm doing -.-

Any nudge in the right direction would be greatly appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

断肠人 2025-01-03 09:01:04

您必须使用 CONTENT cObject 加载内容元素并设置内容的呈现方式。这将在给定页面上加载图像内容元素,无论它们位于哪一列:

page.10.marks.PROJECTTHUMBNAIL = CONTENT
page.10.marks.PROJECTTHUMBNAIL {
  table = tt_content
  select {
    where = CType = 'image' AND image != ''
    orderBy = sorting ASC
  }
  renderObj = IMAGE
  renderObj {
    file {
      import = uploads/pics/
      import.field = image
      import.listNum = 0
    }
  }
}

注意renderObj 只是我的示例,它仅渲染第一张图像图像元素的。您可以根据需要设置渲染,例如将文件设置为GIFBUILDER,这样您就可以调整图像的大小。您还可以调整选择以加载具有更精细条件的内容元素。

You have to load the content elements using the CONTENT cObject and set how the content shall be rendered. This will load Image content elements on the given page regardless of what column they are in:

page.10.marks.PROJECTTHUMBNAIL = CONTENT
page.10.marks.PROJECTTHUMBNAIL {
  table = tt_content
  select {
    where = CType = 'image' AND image != ''
    orderBy = sorting ASC
  }
  renderObj = IMAGE
  renderObj {
    file {
      import = uploads/pics/
      import.field = image
      import.listNum = 0
    }
  }
}

NOTE: The renderObj is just my example and it renders only the first image of the Image element. You can set the rendering as you please, e.g. set the file to be GIFBUILDER which would allow you to resize the image. You can also tweak the select to load content elements with more refined conditions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文