image - TYPO3 10.4 / FLUIDTEMPLATE / renderObj / 图像
问题描述
我有一个简单的模板,它显示了“页面”的“content_icon”的全部内容——到目前为止一切都很好。
现在我只想添加“content_icon”中的图像 - 没办法。
这是 (ext+) 模板:
<f:section name="main">
<f:format.htmlentitiesDecode>{content_icon}</f:format.htmlentitiesDecode>
<p>-----------------------------</p>
<p>
<f:cObject typoscriptObjectPath="SliderElement.10.variables.icon"/>
</p>
<p>{icon}</p>
</f:section>
我已经尝试过这个(以及更多) https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ContentObjects/Files/Index.html#usage-with-references但是->根本没有输出。
我发现,如果我添加以下作业,似乎任何东西都被读取了......我得到一个输出 - 但没有图像......
page_id < styles.content.get
现在使用 TYPO3 10.4 扩展(模板)挣扎了 3 天。没有看到任何光亮。
SliderElement = PAGE
SliderElement.10 = FLUIDTEMPLATE
SliderElement.10 {
format = html
file = fileadmin/site_elements/Templates/SliderElement.html
partialRootPath = fileadmin/site_elements/Partials/
layoutRootPath = fileadmin/site_elements/Layouts/
variables {
page_id = FILE
page_id < styles.content.get
page_id.select.where = "tt_content"."colPos" = 20
page_id {
stdWrap.wrap = <div class="pic">|</div>
references {
uid.data = uid
#fieldName = image // try
#fieldName = media // try
fieldName = assets
}
renderObj = IMAGE
renderObj {
file {
import.data = file:current:uid
treatIdAsReference = 1
}
altText.data = file:current:alternative
stdWrap.typolink.parameter.data = file:current:link
}
}
content_icon < styles.content.get
content_icon.select.where = "tt_content"."colPos" = 20
}
}
任何帮助或想法都会很好......
解决方案
推荐阅读
- flutter - 输入未来
- > 不是颤振中列表错误的子类型
- powershell - 在批处理文件中使用 Powershell 命令
- r - 在 R 中,如何从 ax、y、z 表中绘制 5x3 条形图?
- algorithm - 求解位方程
- spring-boot - Spring Batch Reader 正在读取备用记录
- mysql - 计算余额为正的期间和平均总和
- apache-flink - Flink statefun co-located 功能通信
- python - 如何在 Python 中打印金字塔?
- sparql - 在数据集中查找 URI
- facebook-pixel - Facebook 像素不会在 PageView 上发送数据