如何设置网格元素的图标(向导)
似乎有一些变化,因为我以前做的方式不再适用.
我在文档中没有发现任何相关信息
typo3 Version 7.LTS/Gridelements 7.0.5
tx_gridelements {
overruleRecords = 1
setup {
TB_3col {
title = Drei Spalten einfach
description = (33-33-33; 50-25-25; 25-50-25; 25-25-50) (12er Grid)
topLevelLayout = 1
icon = EXT:myext/Resources/Public/Icon/grid.png
config {
colCount = 3
rowCount = 1
rows {
1 {
columns {
1 {
name = Spalte 1
colPos = 101
}
2 {
name = Spalte 2
colPos = 102
}
3 {
name = Spalte 3
colPos = 103
}
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我刚刚找到了解决方案.icon切换到iconIdentifier
tx_gridelements {
overruleRecords = 1
setup {
TB_2col {
title =Zwei Spalten einfach
description = (50-50; 66-33; 33-66; 75-25; 25-75) (12er Grid)
topLevelLayout = 1
iconIdentifier = default-icon
flexformDS = FILE:EXT:fred/Configuration/FlexForms/Grid/TB_2col.xml
config {
colCount = 2
rowCount = 1
rows {
1 {
columns {
1 {
name = Spalte 1
colPos = 101
}
2 {
name = Spalte 2
colPos = 102
}
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
添加图标 ext_tables.php
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
$iconRegistry->registerIcon(
'default-icon',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:myext/Resources/Public/Images/CE/myicon.png']
);
Run Code Online (Sandbox Code Playgroud)