Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables 类型3:从内联元素获取流体中的值_Variables_Typo3_Fluid - Fatal编程技术网

Variables 类型3:从内联元素获取流体中的值

Variables 类型3:从内联元素获取流体中的值,variables,typo3,fluid,Variables,Typo3,Fluid,我设法创建了一个自己的内联内容元素(在tt_内容表上),但当我试图通过fluid获取前端的值时,什么也得不到 我调试了{data}变量,在保存数据的列上有一个整数。我想它读取在外部表(accordion)上创建的内容元素的数量。如何获取这些值 此时,{data}变量读取tt_内容表,具有整数的列读取表accordion上内容元素的数量 我想不需要代码。如有必要,请随意评论您想查看的代码部分。 致以最诚挚的问候您需要在打字稿中添加一个数据处理器,以创建内容元素,从而获取手风琴记录。例如: tt_c

我设法创建了一个自己的内联内容元素(在tt_内容表上),但当我试图通过fluid获取前端的值时,什么也得不到

我调试了{data}变量,在保存数据的列上有一个整数。我想它读取在外部表(accordion)上创建的内容元素的数量。如何获取这些值

此时,{data}变量读取tt_内容表,具有整数的列读取表accordion上内容元素的数量

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


致以最诚挚的问候

您需要在打字稿中添加一个数据处理器,以创建内容元素,从而获取手风琴记录。例如:

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
        }
    }
}
tt\u内容{
yourContentElementName
您需要在打字稿中添加一个数据处理器,创建内容元素,以获取手风琴记录。例如:

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
        }
    }
}
tt\u内容{
yourContentElementName