Commit 8538ea0a authored by Sebastian Iffland's avatar Sebastian Iffland Committed by Benni Mack

[FEATURE] Allow icon overlay in newContentElementWizard

A new TSconfig option `iconOverlay` is introduced,
which allows to define an icon overlay for each
element within the newContentElementWizard.

Releases: master
Resolves: #92942
Change-Id: Ib6aa02424e5a1d6411ef8fc9830364c8b2c19a31
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66909Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarRichard Haeser <richard@richardhaeser.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarRichard Haeser <richard@richardhaeser.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 67ad9d7a
......@@ -275,7 +275,12 @@ class NewContentElementController
$url = $this->uriBuilder->buildUriFromRoute('tce_db', $urlParams);
$aOnClick = 'list_frame.location.href=' . GeneralUtility::quoteJSvalue((string)$url) . '; return false';
}
$icon = $this->moduleTemplate->getIconFactory()->getIcon($wInfo['iconIdentifier'])->render();
$icon = $this->moduleTemplate->getIconFactory()->getIcon(
($wInfo['iconIdentifier'] ?? ''),
Icon::SIZE_DEFAULT,
($wInfo['iconOverlay'] ?? '')
)->render();
$this->menuItemView->assignMultiple([
'onClickEvent' => $onClickEvent,
......
.. include:: ../../Includes.txt
=========================================================================
Feature: #92942 - Allow icon overlay for newContentElementWizard elements
=========================================================================
See :issue:`92942`
Description
===========
The new Content Element wizard within the page module now allows
to define an icon overlay for each wizard element using the new
TSconfig option `iconOverlay` next to a defined `iconIdentifier`.
This is especially useful for custom content elements that use the
same `iconIdentifier` several times, but still have to be differentiated.
The full configuration path is
:typoscript:`mod.wizards.newContentElement.wizardItems.*.elements.*.iconOverlay`.
An example configuration could look like this:
.. code-block:: typoscript
mod.wizards.newContentElement.wizardItems {
common.elements {
my_element {
iconIdentifier = content-my-icon
iconOverlay = content-my-icon-overlay
title = LLL:EXT:my_extension/Resources/Private/Language/ContentTypes.xlf:my_element_title
description = LLL:EXT:my_extension/Resources/Private/Language/ContentTypes.xlf:my_element_description
tt_content_defValues {
CType = my_element
}
}
}
}
Impact
======
It's now possible to define an `iconOverlay` next to an `iconIdentifier`
for newContentElementWizard elements.
.. index:: Backend, TSConfig, ext:backend
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment