TYPO3:覆盖来自另一个扩展的 TCA 后端 class public 变量
TYPO3: Override TCA backend class public variables from another extension
我正在为 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';
感谢大家的帮助!
你有没有尝试过这样的 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
}
}
}
}
}
我正在为 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';
感谢大家的帮助!
你有没有尝试过这样的 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
}
}
}
}
}