[TYPO3-english] Hook for Sprite Icons

Jigal van Hemert jigal.van.hemert at typo3.org
Tue Sep 25 16:18:17 CEST 2012


Hi,

On 25-9-2012 14:19, Kay Strobach wrote:
> is there anyway to change the icon class outputted for a specific record?
>
> 	e.g. in t3lib_iconWorks::getSpriteIconForRecord
>
> Is this case i want to change the icon of a page based on records
> present on this page ...

A bit later in the process in mapRecordTypeToSpriteIconName() there is 
the option to use a userfunc if that is defined in the TCA 
($GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['userFunc'] )

You would need to change the TCA of the pages table and write a 
function. The page record is passed to the userfunction, so you can look 
up the CEs which are present on the page.

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list