如何从Typo3中的内容元素中的两个记录中获取值?
我在Typo3中创建了一个内容元素(VER。11.5.9)。 现在,我想用流体完成我的HTML文件。但是我无法从数据库表中显示我的数据。
在内容元素中,有两个选项卡,在每个选项卡中,我都可以添加一些子项目。
我在数据库中的表格是这样的:
- tt_content
- tx_anreisetag_item(这是Anreisetag的选项卡的表)
- TX_ABREISETAG_ITEM(这是Abreisetag选项卡的表),
这些子项目的数据在表中放弃了tx_anreisetag_anreisetem 和
tx_abreisetag_item
。
我在Anreisetag中添加了三个记录,并在Abreisetag中添加了两个记录。但是,如果我在前端检查调试,那么我只能看到两个记录abreisetag
。我找不到anreisetag
:
在Typoscript中我写了此代码:
tt_content.klassenfahrt_anundabreisetag >
tt_content.klassenfahrt_anundabreisetag =< lib.contentElement
tt_content.klassenfahrt_anundabreisetag {
templateName = AnundAbreisetag
dataProcessing {
20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
20 {
table = tx_anreisetag_item
pidInList.field = pid
where {
data = field:uid
intval = 1
wrap = tt_content=|
}
orderBy = sorting
}
30 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
30 {
table = tx_abreisetag_item
pidInList.field = pid
where {
data = field:uid
intval = 1
wrap = tt_content=|
}
orderBy = sorting
}
40 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
40 {
references.fieldName = tx_anreisetag_image
as = imageAnreise
}
50 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
50 {
references.fieldName = tx_abreisetag_image
as = imageAbreise
}
}
}
如何注册我的另一个记录anreisetag
?
我希望有人可以帮助我。谢谢。
I created a content element in TYPO3 (Ver. 11.5.9).
Now I want to finish my HTML-files with Fluid. But I can't display my data from my table of a database.
The Backend of the content element seems like so:
In a content element there are two tabs and in every tab I can add some child items.
My table in a database is so:
- tt_content
- tx_anreisetag_item (this is a table for a tab of Anreisetag)
- tx_abreisetag_item (this is a table for a tab of Abreisetag)
The data of the child items are saved in the tablestx_anreisetag_item
and tx_abreisetag_item
.
I added three records in Anreisetag and two records in Abreisetag. But if I check a debug in the frontend, then I can see just two records of Abreisetag
. I can't find no object of Anreisetag
:
In typoscript I wrote this codes:
tt_content.klassenfahrt_anundabreisetag >
tt_content.klassenfahrt_anundabreisetag =< lib.contentElement
tt_content.klassenfahrt_anundabreisetag {
templateName = AnundAbreisetag
dataProcessing {
20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
20 {
table = tx_anreisetag_item
pidInList.field = pid
where {
data = field:uid
intval = 1
wrap = tt_content=|
}
orderBy = sorting
}
30 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
30 {
table = tx_abreisetag_item
pidInList.field = pid
where {
data = field:uid
intval = 1
wrap = tt_content=|
}
orderBy = sorting
}
40 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
40 {
references.fieldName = tx_anreisetag_image
as = imageAnreise
}
50 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
50 {
references.fieldName = tx_abreisetag_image
as = imageAbreise
}
}
}
How can I register my another records of Anreisetag
?
I hope someone can help me. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要告诉
databasequeryProcessor
记录的名称。如果您不添加
以及其他调用,则两个查询都存储在名为
Records
的变量中。然后,第一个查询将被第二个查询覆盖。小提示:使用英语变量。
You need to tell the
DatabaseQueryProcessor
the name of the records.If you don't add
and also for the other call, both queries are stored in the variable named
records
. Then the first query will be overwritten by the second query.Small hint: Use english variables.
我无法确定,因为您尚未提供TCA和SQL声明,但我认为您使用UID访问了记录,这就是关系的计数。
Typo3插入具有记录计数的字段,其中记录关系存储在相关记录(作为后链接)或MM记录中。
I can't be sure as you have not provided your TCA and SQL declaration, but I assume you accessed the record with the uid, that is the count of relations.
TYPO3 inserts a field with the count of records, where the record relation is stored either in the related record (as a back link) or in mm-records.