简体   繁体   English

在Typo3中为Mask-Elements设置后端标题

[英]Set backend title for Mask-Elements in Typo3

I have a Typo3 server. 我有一个Typo3服务器。 On that I created some different content elements with mask. 在此之上,我使用遮罩创建了一些不同的内容元素。 In this elements there are often repeating content, like texts or other stuff. 在这些元素中,经常有重复的内容,例如文本或其他内容。 So the editors make a new element in the backend, there they can add a headline and as much text parts as they want. 因此,编辑者在后端创建了一个新元素,他们可以在其中添加标题和所需的尽可能多的文本部分。 Often it looks like this: 通常看起来像这样: 应该是这样的

Thats good, the editor can see a "preview" of the textparts. 很好,编辑者可以看到文本部分的“预览”。 In this example "Karriere,Partner...". 在此示例中,“ Karriere,Partner ...”。 This naming happens automatically. 该命名自动发生。 My Problem is, some times there arent any titles. 我的问题是,有时没有任何标题。 Its always "No title". 它始终是“无标题”。 As an editor its quite hard to find the right dropdown to edit some stuff, you mostly have to open all dropdowns and search for the right one. 作为编辑者,很难找到合适的下拉菜单来编辑某些内容,因此您大多必须打开所有下拉菜单并搜索合适的下拉菜单。

Its look then like this: 它的外观如下所示: 不像这样

In both elements there are some string inputs that are very good for the title. 在这两个元素中,都有一些非常适合标题的字符串输入。

So my question is, how is mask gonna choose the title? 所以我的问题是,面具将如何选择标题? Its not the first string input. 它不是第一个字符串输入。

And secondly, can I tell Mask that they have to choose input field XYZ as title? 其次,我可以告诉Mask他们必须选择输入字段XYZ作为标题吗?

Heyo yo

Yes, you can tell Mask which field to use as a title for inline elements (like repeating contents). 是的,您可以告诉Mask将哪个字段用作内联元素的标题(例如重复内容)。 When you're setting up a new Mask element, right below the "Label" field of the repeated inline element, there is a field "Field that should be used as label for inline element (starting with tx_mask_)". 当您设置新的Mask元素时,在重复的内联元素的“标签”字段正下方,有一个字段“应用作内嵌元素标签的字段(从tx_mask_开始)”。 This will be used as the title that is displayed in the backend. 这将用作后端中显示的标题。 In the placeholder of that field, it explicitly says that "If empty, first field is used". 在该字段的占位符中,它明确表示“如果为空,则使用第一个字段”。

This is how it looks 看起来就是这样

So, if your inline element has a field "my_awesome_header" which you would like to use as the title in the backend, set the above to "tx_mask_my_awesome_header". 因此,如果您的内联元素具有要用作后端标题的字段“ my_awesome_header”,请将以上内容设置为“ tx_mask_my_awesome_header”。

I am not certain as to why it does not display anything in your second example. 对于第二个示例中为什么不显示任何内容,我不确定。 It might be that either the first input field is not a string, or the first input field is a string but it is empty. 可能是第一个输入字段不是字符串,或者第一个输入字段是字符串,但是为空。

I hope this helps. 我希望这有帮助。 Let me know if you need further clarification. 让我知道您是否需要进一步说明。

Edit : Since that question came up, it should be possible to set a static default title to the containing Mask element using mod.wizards.newContentElement.wizardItems.mask.elements.[name of the mask element].tt_content_defValues.header = My awesome static title . 编辑 :由于出现了这个问题,应该可以使用mod.wizards.newContentElement.wizardItems.mask.elements.[name of the mask element].tt_content_defValues.header = My awesome static title ,为包含的Mask元素设置一个静态默认标题mod.wizards.newContentElement.wizardItems.mask.elements.[name of the mask element].tt_content_defValues.header = My awesome static title As I said in the comments, though: I always give my Mask elements a header field and let editors fill that in. 但是,正如我在评论中所说:我总是给我的Mask元素一个标头字段,并让编辑者填写它。

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

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