[TYPO3-dev] How to add custom overlays to Backend sprite icons?

Dirk Wenzel wenzel at webfox03.de
Tue Mar 3 07:56:07 CET 2015


Hi Philipp,
thank you for reading and pushing me forward.
I will try and add some lines there.

Cheers
Dirk

Am 03.03.15 00:13, schrieb Philipp Gampe:
> Hi Dirk Wenzel,
>
> Dirk Wenzel wrote:
>
>> Here comes what I missed:
>> Icons for overlays are registred like any other icon:
>> SpriteManager::addSingleIcons(
>> array('<iconName>' => '<pathToIconFile>')
>> );
>>
>> In my example the following lines in ext_tables.php are necessary:
>> \TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons(
>> array(
>> 'status-overlay-is-duplicate' =>
>> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) .
>> 'Resources/Public/Icons/icon-overlay-is-duplicate.png',
>> ),
>> $_EXTKEY
>> );
>>
>> The now registred icon will be available under a name build by the rule:
>> 'extensions-<extensionName>-<iconName>'
>> In my example under:
>> 'extensions-<extensionName>-statusoverlay-is-duplicate'
>>
>> Therefore I have to set in ext_tables.php:
>> $GLOBALS['TBE_STYLES']['spriteIconApi']['spriteIconRecordOverlayNames']
> ['isDuplicate']
>> = 'extensions-<extensionName>-status-overlay-is-duplicate';
>
> Mind adding your findings to the documentation?
> http://docs.typo3.org/typo3cms/SkinningReference/UseCases/UseCase2RegisteringANewIconWithTheBackend/Index.html
>
> There is a big orange button on the top-right: "Edit me on Github".
>
> Just add your findings as nother use case. Then other can profit from your
> research.
>
>
> Best regards
>



More information about the TYPO3-dev mailing list