【发布时间】:2018-11-19 10:28:49
【问题描述】:
我正在使用 Typo3 的 tx_news 扩展。因此,我想禁用一些在我的页面上未使用的设置,例如类别:
我已经在 PageTS 中为这样的记录禁用了它们:
TCEFORM {
tx_news_domain_model_news {
categories.disabled = 1
}
}
从管理过滤器和列中删除它们:
tx_news {
module {
columns = istopnews,datetime,author
filters {
categories = 0
categoryConjunction = 0
includeSubCategories = 0
}
}
}
现在我还想在将插件添加到页面时在插件设置中禁用它们。在 BackendUtility.php 我发现以下几行谁会为我做这件事(注意我已经添加了类别 categoryConjunction,..):
public $removedFieldsInListView = [
'sDEF' => 'dateField,singleNews,previewHiddenRecords,selectedList,categories,categoryConjunction,includeSubCategories',
'additional' => '',
'template' => ''
];
当然,像这样我已经禁用了类别,但是通过直接编辑扩展而不是从我自己的扩展中覆盖它,这意味着当我更新 tx_news 时,我将丢失该配置。
我必须添加什么 $GLOBALS[TCA].. 才能获得相同的结果?我在后端调试中找不到任何东西...
我正在搜索类似的东西(或一些 TypoScript 的东西,如果可能的话):
$GLOBALS['TCA']['tx_news_domain_model_news']['plugin']['backendUtility'][removeFieldsInListView]= 'bla, blabla, bla';
感谢所有帮助!
【问题讨论】:
标签: php typo3 overriding tx-news