namelesscoder / typo3-cms-data-processors
此包的最新版本(1.0.0)没有提供许可证信息。
1.0.0
2018-09-03 14:51 UTC
Requires
- php: ^7
- typo3/cms-frontend: ^8.7 || ^9
Replaces
- data_processors: 1.0.0
This package is auto-updated.
Last update: 2024-09-12 04:46:17 UTC
README
为您的TYPO3安装提供额外的TypoScript数据处理程序。
您已经知道如何使用Composer包。这个叫做namelesscoder/typo3-cms-data-processors
。
结构化变量数据处理程序
旨在填补FLUIDTEMPLATE数据处理程序和变量之间的差距,这些变量仅允许单级变量,以促进结构化变量的创建和覆盖。
允许您做两件您通常不能做的事情
- 支持
as
参数的其他数据处理程序现在可以支持使用点路径作为目标变量名,例如,菜单数据处理程序可以将菜单项数组放入Fluid中的嵌套数组。 - TypoScript对象也可以使用点路径变量名作为模板变量进行渲染和赋值。
此外,数据处理程序允许覆盖已分配数组中的变量,例如设置数组 - 如果您之前已将域模型实例作为模板变量分配,则还可以覆盖模型对象实例的属性。
示例
# First, a standard data processor - except with a dotted-name variable in "as"
page.10.dataProcessing.150 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
page.10.dataProcessing.150 {
levels = 4
as = foo.bar.menu
expandAll = 1
titleField = nav_title // title
}
# The StructuredVariablesProcessor must always come last...
page.10.dataProcessing.5000 = NamelessCoder\DataProcessors\StructuredVariablesProcessor
# ...and it can define any number of TS objects as first-level children
page.10.dataProcessing.5000.searchText = TEXT
page.10.dataProcessing.5000.searchText.value = Test...
# ...which now also supports (actually, requires) an "as" attribute
page.10.dataProcessing.5000.searchText.as = foo.bar.text
# ...that then creates that variable and has it re-mapped by the structured variables processor.
成为Fluid变量的结果数组结构
[ "foo" => [ "bar" => [ "menu" => [...array of menu items...], "text" => "Test..." ] ] ]
这意味着您可以按以下方式引用两个新变量
{foo.bar.menu}
{foo.bar.text}
致谢
此包包含由SYZYGY GmbH赞助的工作。如果您使用TYPO3,那么SYZYGY可能正在寻找像您这样的人!