简体   繁体   中英

Set backend title for Mask-Elements in Typo3

I have a Typo3 server. 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...". 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?

Heyo

Yes, you can tell Mask which field to use as a title for inline elements (like repeating contents). 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_)". 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".

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 . As I said in the comments, though: I always give my Mask elements a header field and let editors fill that in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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