'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.
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?
Solution 1:[1]
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".
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | yunzen |