Issue Bug Closed

#104432core:icon viewhelper - examples in doc header are wrong

Philipp Kuhlmay 07/19/24, 08:58 updated 07/19/24, 09:26

Description

In EXT:sysext/core/Classes/ViewHelpers/IconViewHelper.php according to the doc header examples the following code:

<core:icon title="Open actions menu" identifier="actions-menu" />

should output the following:

<span title="Open actions menu" class="t3js-icon icon icon-size-small icon-state-default icon-actions-menu" data-identifier="actions-menu" aria-hidden="true">
    <span class="icon-markup">
        <img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/actions/actions-menu.svg" width="16" height="16">
    </span>
</span>

but in fact it outputs this:

<span title="Open actions menu" class="t3js-icon icon icon-size-small icon-state-default icon-actions-menu" data-identifier="actions-menu" aria-hidden="true">
  <span class="icon-markup">
    <svg class="icon-color"><use xlink:href="/typo3/sysext/core/Resources/Public/Icons/T3Icons/sprites/actions.svg#actions-menu"></use></svg>
  </span>    
</span>

So it outputs an svg instead of the img-tag. Either the example or the output code is wrong.

I use the main branch with TYPO3 13 and the latest commits. Nothing special.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Andreas Kienast commented and changed status New Closed 07/19/24, 09:06

    Both is correct. The concrete output depends on which icon provider is used for the requested icon. Since there is no general truth for all cases, I’ll close the ticket.

  2. Philipp Kuhlmay changed description 07/19/24, 09:26