简体   繁体   English

TYPO3 TCA-在树级别显示或隐藏选项卡

[英]TYPO3 TCA - Display or hide tabs at treelevel

For an project, I have extended the TYPO3 TCA with a extra extension, named "project_extends". 对于一个项目,我用一个额外的扩展名为“ project_extends”扩展了TYPO3 TCA。 Now, I have all new TCA Objects - sorted in tabs - on every Treepoint/Contentpage, to configurate some fluid templates or extensions. 现在,我在每个Treepoint / Contentpage上都有所有新的TCA Objects(在选项卡中排序),以配置一些流畅的模板或扩展。

For example: I have three tabs, named "Tab1","Tab2" and "Tab3". 例如:我有三个选项卡,分别为“ Tab1”,“ Tab2”和“ Tab3”。 Now I want to display Tab1 and Tab3 at the second tree-level of the contentpages, but not at level one. 现在,我想在内容页面的第二个树级别上显示Tab1和Tab3,但不在第一级上显示。

I don't found a understandable solution via google & co and hope here of helpful solutions :) 我找不到通过google&co可以理解的解决方案,希望在这里提供有用的解决方案:)

That's simple, to hide whole tab you just need to disable ALL fields which are visible on it. 很简单,要隐藏整个标签,您只需禁用所有可见的字段。

To do this open page properties, find Page TSconfig field and for each field you want to disable add something like this: 要执行此打开页面属性,请找到“ Page TSconfig字段,然后为要禁用的每个字段添加如下内容:

TCEFORM.tt_content.list_type.disabled = 1 

in this sample tt_content is a required table and list_type is the field. 在此示例中, tt_content是必填表, list_type是字段。 Normally (without above config) it should be visible as only field on the Plugin tab when inserting TT content with type Insert Plugin , however while you disabled it will be hidden and also tab will disappear. 通常(没有上述配置),当插入类型为Insert Plugin的 TT内容时,它应该仅在Plugin选项卡上的字段中可见,但是在禁用时,它将被隐藏,并且选项卡也将消失。

Tip: you can recognize these values using some browser inspection tool, ie FireBug of Firefox. 提示:您可以使用某些浏览器检查工具(即Firefox的FireBug)识别这些值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM