IconForRecord ViewHelper <core:iconForRecord>

Displays icon for record.

Examples

Default:

<core:iconForRecord table="tt_content" row="{record}" />
Copied!

Output:

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

Source code

Go to the source code of this ViewHelper: IconForRecordViewHelper.php (GitHub).

Arguments

The following arguments are available for <core:iconForRecord>:

Name Type Default
string
mixed
string \TYPO3\CMS\Core\Imaging\IconSize::SMALL
string
table
Type
string
Required

true

The table for the record icon

row
Type
mixed
Required

true

The record row

size
Type
string
Default
\TYPO3\CMS\Core\Imaging\IconSize::SMALL

The icon size

alternativeMarkupIdentifier
Type
string

Alternative markup identifier