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

Philipp Gampe philipp.gampe at typo3.org
Tue Mar 3 00:13:00 CET 2015


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
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!




More information about the TYPO3-dev mailing list