I have a custom content element in a TYPO3 v10 installation.
It works just fine – except one thing.
When creating a TYPO3 standard content element it’s type is shown above the headline in pageview in backend. In my content element only the headline is shown – but not the type.
It would be nice to have the type shown above the header. Like the "Text & Media Element" label as shown in the screenshot. How can I achieve that?
It’s best seen on this screenshot:
I already looked up the documentation, but didn’t find a solution.
Additional info: first I had the problem that the icon in this view was always the default ce-text one, although I configured the "content-map" one from the core icons.
I could fix that by adding $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['my_ext_map'] = 'content-map';
to
EXT:my_ext/Configuration/TCA/Overrides/tt_content.php
Maybe that relates?
2
Answers
As far as I know it’s not a default feature of TYPO3 v10 to show the CType in the backend preview as shown in your screenshots. We maintain a lot of instances and I can’t find one which shows the CType like you.
What extensions do you have installed in your TYPO3 instance? Maybe there is an extension which adds a Custom Backend Preview?
You can check that in the Configuration Module. Got to
$GLOBALS['TCA']
and thentt_content
=>ctrl
=>previewRenderer
.If you don’t have the configuration module you need to install the system extension "lowlevel".
From an editors point of view: it is really an added value for the editor to see the CType as text in the preview? For me it clutters the preview too much. The CType can be determined by the icon as you mentioned as well. And if an Editor really needs to know the CType, simply edit that element.
This can easily be done via a hook which is described in the second part „With "Classic" Page Module“ of the above mentioned „Configure Custom Backend Preview for Content Element“. I’m using this with nearly all of my own content elements.
I’m adding the icon the same way as you, but with a custom icon. There should be no interference.