我有一个将值存储在 FlexForm 中的内容元素(例如 1234)。该值表示数据库表的 UID。
我想做什么:
- 获取存储在 FlexForm 中的单个值(已经工作)
- 使用此值运行数据库查询
- 在前端显示数据
问题:我不知道如何将 FlexForm 值移交给 DB 查询的 where 子句。
tt_content {
my_addresscontainer =< lib.contentElement
my_addresscontainer {
templateName = AddressContainer
templateRootPaths {
10 = EXT:xyz/Resources/Private/Partials/ContentElements/
}
partialRootPaths {
10 = EXT:xyz/Resources/Private/Partials
}
dataProcessing {
1 = xyz\DataProcessing\FlexFormProcessor
1 {
options {
if.isTrue.field = pi_flexform
fieldName = pi_flexform
}
as = content
}
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
10 {
table = tt_address
pidInList = 19
markers {
myuid.value = 191901 <- This should be handed over...
}
where = uid =###myuid###
as = address_record
}
}
}
}
先感谢您。