我需要从 pi_flexform 获取 typescript 中的 page.headerData。如何实现我的要求?
page = PAGE
page {
headerData {
10 = TEXT
10.value =<script>/**********************/</script>
}
}
我不太确定你真正需要什么。我是guessing您想访问 TypoScript 中的 FlexForm 配置吗?
从版本 8.4 开始,可以使用普通的 TypoScript
lib.flexformContent = CONTENT
lib.flexformContent {
table = tt_content
select {
pidInList = this
}
renderObj = COA
renderObj {
10 = TEXT
10 {
data = flexform: pi_flexform:settings.categories
}
}
}
The key flexform
后面是保存 Flexform 数据的字段以及应检索其内容的属性名称。
在 8.4 之前你需要使用userFunc
并使用 PHP 检索值
$flexFormService = GeneralUtility::makeInstance(FlexFormService::class);
$flexFormKey = str_replace('.', '|', $keyParts[1]);
$settings = $flexFormService->convertFlexFormContentToArray($flexFormContent);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)