TYPO3:从内联元素中获取流体中的值

TYPO3: Get the values in fluid from inline elements

我设法创建了一个自己的内联内容元素(在 tt_content table 上)但是当我尝试通过流体在前端获取值时,我什么也得不到。

我调试了{data}变量,在保存我的数据的那一列,有一个整数。我想它会读取在外部 table(手风琴)上创建的内容元素的数量。我怎样才能得到这些值?

此时 {data} 变量读取 tt_content table 并且具有整数的列读取 table 手风琴上的内容元素数。

我想不需要代码。如果有必要,请随时评论您要查看的代码部分。

此致

您需要将 DataProcessor 添加到您的 TypoScript 以创建内容元素,以获取手风琴记录。示例:

tt_content {
    yourContentElementName < lib.contentElement
    yourContentElementName.templateName = YourContentElementName
    yourContentElementName.dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
        10 {
            if.isTrue.field = fieldInTtContentWithInteger

            table = your_accordion_table

            pidInList = this
            where.field = uid
            where.intval = 1
            where.dataWrap = field_pointing_to_ttcontent_record = |

            as = accordions
        }
    }
}