在 Fluid 模板中使用typoscriptObjectPath 从 UID 获取图像?

发布于 2025-01-15 04:17:13 字数 387 浏览 4 评论 0 原文

在我的 Fluid 模板中,我有一个类别的 uid。 如何从该类别的字段中获取图像?

我尝试过

然后是这样的:

lib.catImage = CONTENT
lib.catImage {
    table = sys_category
    current = 1
    select {
        fieldName = cat_image
    }
    renderObj {
        ???
    }
}

In my Fluid template I have a uid of a category.
How can I get an image from a field on that category?

I've tried <f:cObject typoscriptObjectPath="lib.catImage" data="{myuid}" />

Then something like:

lib.catImage = CONTENT
lib.catImage {
    table = sys_category
    current = 1
    select {
        fieldName = cat_image
    }
    renderObj {
        ???
    }
}

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

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

发布评论

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

评论(1

最偏执的依靠 2025-01-22 04:17:13

您不想获得 内容但是FILES

lib.catImage = FILES
lib.catImage {
  maxItems = 1
  references {
    table = sys_category
    uid.data = field:uid
    fieldName = images
  }

  renderObj = TEXT
  renderObj {
    stdWrap.data = file:current:uid
  }
}

并通过

You don't want to get CONTENT but FILES:

lib.catImage = FILES
lib.catImage {
  maxItems = 1
  references {
    table = sys_category
    uid.data = field:uid
    fieldName = images
  }

  renderObj = TEXT
  renderObj {
    stdWrap.data = file:current:uid
  }
}

And call it via <f:cObject typoscriptObjectPath="lib.catImage" data="{uid: {myuid}}" />

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