【发布时间】:2015-08-31 10:46:47
【问题描述】:
我在 Typo3 中设置了一个内容元素,其中我的文本旁边有一个图标。
因为 tt_content 表中的大多数列仍然是空的,所以我想使用子标题列来输入我的图标。 这提供了一个文本输入类型,但我想将其更改为一个选择框(带有我定义的所有图标)。
我在我的 tca/overrides/tt_content.php 中使用它
$GLOBALS['TCA']['tt_content']['types']['ext_icon']['showitem'] =
'--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
header; Title;,
bodytext; Text;;richtext[*]:rte_transform[],
subheader; Icon;,
header_link;Button link;';
我想将此子标题部分更改为选择。
我确实用过这种方式:
$GLOBALS['TCA']['tt_content']['columns']['subheader'] = array(
"exclude" => 1,
"label" => "test",
"config" => array(
'type' => 'select',
'items' => array(
array('Warning', 'warning'),
array('Alert', 'alert'),
array('Sign', 'sign'),
)
)
)
这行得通,但是在每个地方我都有这个选择类型作为我的子标题。
如何只为这个元素设置op,让其他地方使用默认输入类型?
顺便说一句,我使用 Typo 6.2.x
【问题讨论】:
标签: php typo3 typo3-6.2.x