首页 文章

TYPO3:覆盖来自另一个扩展的TCA后端类公共变量

提问于
浏览
2

我正在使用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';

我感谢所有的帮助!

1 回答

  • 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
                    }
                }
            }
        }
    }
    

相关问题