[英]Howto to configure TCA settings and save them globaly
I'm configuring a new website with TYPO3 v. 9.5. 我正在使用TYPO3 v.9.5配置一个新网站。
I would like to configure TCA settings to make it possible to force editors to fill fields in content elements like media or news. 我想配置TCA设置,以使编辑人员可以在媒体或新闻等内容元素中填充字段。 In former times I was able to put this settings into a file typo3conf/extTables.php. 在以前,我能够将此设置放入一个typo3conf / extTables.php文件中。
In my investigations I found, that I have to put configurations into a directory Configuration/TCA/Overrides of an extension. 在调查中,我发现必须将配置放入扩展的目录Configuration / TCA / Overrides中。 I tested it with the extension tx_news like this: 我使用扩展名tx_news进行了如下测试:
I put this code in a file called test.php as a test and example. 我将此代码放在一个名为test.php的文件中作为测试和示例。
This code forces the editor to always enter an archive date. 此代码强制编辑者始终输入存档日期。
This works for me, but after an extension update, this code might be lost and I cannot configure the fields of core extensions for example to force an editor to always enter a title of a content element. 这对我有用,但是在扩展名更新后,此代码可能会丢失,并且我无法配置核心扩展名的字段,例如,强制编辑器始终输入内容元素的标题。
My question is, how can I store this configurations update save within the configuration environment? 我的问题是,如何在配置环境中存储此配置更新保存?
Thank you in advance, 先感谢您,
Ralf 拉尔夫
Depending on your modifications you need to consider some aspects: 根据您的修改,您需要考虑一些方面:
always use a filename according to the table your modifications belong. 请始终根据您的修改所属的表使用文件名。
so for the news records it should be: Configuration/TCA/Overrides/tx_news_domain_model_news.php
因此对于新闻记录,它应该是: Configuration/TCA/Overrides/tx_news_domain_model_news.php
make sure your modifications are loaded after the first initial configuration: make a dependency to the original extension. 确保在第一个初始配置之后加载您的修改:依赖原始扩展名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.