Attention

TYPO3 v10 has reached end-of-life as of April 30th 2023 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.

Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.

iconForResource

Displays icon for a FAL resource (file or folder means a TYPO3\CMS\Core\Resource\ResourceInterface).

Examples

Default:

<core:iconForResource resource="{file.resource}" />

Output:

<span class="t3js-icon icon icon-size-small icon-state-default icon-mimetypes-text-html" data-identifier="mimetypes-text-html">
    <span class="icon-markup">
        <img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/mimetypes/mimetypes-text-html.svg" width="16" height="16">
    </span>
</span>

Arguments

resource

DataType

mixed

Required

true

Description

Resource

size

DataType

string

Default

'small'

Required

false

Description

The icon size

overlay

DataType

string

Required

false

Description

Overlay identifier

options

DataType

mixed

Default

array ()

Required

false

Description

An associative array with additional options

alternativeMarkupIdentifier

DataType

string

Required

false

Description

Alternative markup identifier