[英]Typo3 6.0 - TCA - news - hide certain types of news in select field
I am new to typo3, and I need help concerning the News extension and the $TCA configuration. 我是typo3的新手,我需要有关新闻扩展和$ TCA配置的帮助。
I have made an extension called "Activité" which extends from News. 我做了一个名为“Activité”的扩展,它来自新闻。 This went pretty well.
这很顺利。 I created some custom fields and I was able to make my extension "selectable" from the select field already available in the "General" tab.
我创建了一些自定义字段,并且我可以从“常规”选项卡中已有的选择字段中使我的扩展名“可选”。
All I want to do is to hide the default selectable fields already there (in this case, I want to hide "Internal page" and "External page". 我想要做的就是隐藏已存在的默认可选字段(在这种情况下,我想隐藏“内部页面”和“外部页面”)。
It seems so simple, but I want to do this the right way. 看起来很简单,但我想以正确的方式做到这一点。
You did not write what news extension you use. 您没有写下您使用的新闻扩展程序。 For old one tt_news you disable by
对于旧的tt_news你禁用了
TCEFORM.tt_news.type.removeItems = 1,2
for new one "news" by 对于新的“新闻”
TCEFORM.tx_news_domain_model_news.type.removeItems = 1,2
General syntax is: 一般语法是:
TCEFORM.[table_name].[field_name].[action]
For example you can completyl disable not used fields with 例如,您可以使用完全禁用未使用的字段
TCEFORM.[table_name].[field_name].disabled = 1
You can also set default values to fields with syntax 您还可以使用语法将默认值设置为字段
TCAdefaults.[table_name].[field_name] = value
You should add this typoscript in page propertes. 你应该在页面属性中添加这个typoscript。 Tab "Resources", field TypoScript Configuration / Page TSConfig.
选项卡“资源”,字段TypoScript配置/页面TSConfig。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.