我使用了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';
我感谢所有的帮助!
答案 0 :(得分:3)
你有没有尝过这样的TsConfig
TCEFORM {
tt_content {
pi_flexform {
news_pi1 {
sDEF {
# Important is the escaping of the dot which is part of the fieldname
settings\.orderBy.disabled = 1
}
}
}
}
}