Documentation · ViewHelper reference

Be / Buttons / IconViewHelper

View helper which returns a button icon



<f:be.buttons.icon uri="{f:uri.action()}" />


An icon button as known from the TYPO3 backend, skinned and linked with the default action of the current controller.
Note: By default the "close" icon is used as image


<f:be.buttons.icon uri="{f:uri.action(action:'new')}" icon="actions-document-new" title="Create new Foo" />


<f:be.buttons.icon icon="actions-document-new" title="Create new Foo" />


Here the "actions-document-new" icon is returned, but without link.

  • Tag usage example

    <f:be.buttons.icon uri="''" icon="'actions-document-close'" title="''" additionalAttributes="{foo: 'bar'}">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {f:be.buttons.icon(uri: '''', icon: ''actions-document-close'', title: '''', additionalAttributes: {foo: 'bar'})}


Argument Description Type

Additional tag attributes. They will be added directly to the resulting HTML tag.


Icon to be used.


Title attribute of the icon construct


The target URI for the link. If you want to execute JavaScript here, prefix the URI with

Required attribute

Revision history

commit ff44e717bfec159d9ce96917bd10c26bf613672b
Author: Bastian Waidelich <*****>
Date:   Wed Sep 23 15:33:06 2009 +0000

    [+FEATURE] Fluid(ViewHelpers): Added BE view helpers be.container, be.buttons.csh, be.buttons.icon, be.menus.actionMenu, be.pageInfo & be.tableList. NOTE: BE view helpers are still experimental and subject of change!
    [+FEATURE] Fluid(ViewHelpers): TranslateViewHelper now fully works in BE mode and respects BE user language. This relates to #3292
    [~BUGFIX] Fluid(ViewHelpers): Email addresses are now prepend with "mailto:" in view helper (BE mode)
    [+TASK] Fluid(ViewHelpers): uri.resource view helper now prepends "../" to relative URIs in BE mode
    [~BUGFIX] Fluid(Tests): Fixed some unit tests so that they run green. We still need more tests and a way to simulate FE mode from phpunit.

commit 9b2830bc1c17588dd69a463773c5f05f61b5cf94
Author: Sebastian Kurfürst <*****>
Date:   Sat Oct 24 11:01:38 2009 +0000

    * A*****@api annotations
    * Changed the fluid-specific RuntimeException to SPL's RuntimeException.

commit 1d36de6ed90007e324b773782e8f0a1d1c1191a2
Author: Bastian Waidelich <*****>
Date:   Tue Jul 13 10:12:30 2010 +0000

    [-TASK] Fluid: R*****@package/@subpackage annotations from all Fluid classes. They have already been removed in FLOW3 packages in r2813.

commit dd8928aed4c119d8db37322acb91ded24ba5cc35
Author: Bastian Waidelich <*****>
Date:   Thu Dec 30 16:21:11 2010 +0000

    [+TASK] Fluid (ViewHelpers): Fix, cleanup and extend inline documentation of ViewHelpers
    Resolves #10908

commit 9f603b1f9746b2d7d5a024609ab27d429378b7d1
Author: Stefan Neufeind <*****>
Date:   Sat Jun 11 16:43:35 2011 +0200

    [BUGFIX] Fix documentation for BE-ViewHelpers
    Change-Id: I483d6242b1a35fe3bbfb8a90b193dee0f413108e
    Resolves: #9942

commit d56a9297684d3dade509f735c2d8d7d52dd75849
Author: Stefan Neufeind <*****>
Date:   Sat Jun 11 16:33:06 2011 +0200

    [FEATURE] IconViewHelper (BE) should support CSS-sprites
    Icons for backend should use the sprite-api
    Change-Id: I69584dc4774669d072cf713f46ebd3bede081509
    Resolves: #9957

commit fd09d197fa8886b97cb20aa9573f39cd08ce989e
Author: Bastian Waidelich <*****>
Date:   Thu Nov 10 18:27:58 2011 +0100

    [TASK] S*****@author annotations
    This backports three recent changes of the TYPO3.Fluid package:
    - R*****@license annotation from files (290f4f5)
    - Simplify license header in PHP files (14bacba)
    - D*****@author tags from source code (9c2e837)
    This should not contain any functional change!
    Change-Id: I9376dca4af78c4f0f82413011d115b8ad04634dd

commit ebeb00ed1907db07e89b9a018f7b8aeb5b5cbfb4
Author: Daniel Lienert <*****>
Date:   Fri Oct 28 17:17:45 2011 +0200

    [BUGFIX] Tx_Fluid_ViewHelpers_Be_Buttons_IconViewHelper broken
    It seems as the sprite keys in
    have changed with TYPO3 4.6 and this change was not reflected in
    the experimental backend IconViewHelper, so the old key are not
    longer valid and new ones cant be used because of the allowedIconArray.
    I removed the "securityCheck" and the allowedIconArray, because the validity
    of the icon name is checked again in t3lib_iconWorks::getSpriteIcon
    against the iconAvailable array.
    Change-Id: Ib7cebd9c6dbcd60d487480dea6bf263c9164c2fd

commit ca40f8a066da4ea3c849d74f68a9bc73758976c5
Author: dkd-egerer Sascha Egerer <*****>
Date:   Sat Apr 14 21:43:10 2012 +0200

    [TASK] Remove trailing whitespace
    There must be no empty lines after the closing
    PHP tag. Empty lines after closing tags break
    output compression in PHP and/or result in AJAX
    Change-Id: I0484ca29d8134d0828cf30880d5aafd43ed9d78e
    Resolves: #36076
    Releases: 6.0
    Reviewed-by: Ingo Pfennigstorf
    Tested-by: Ingo Pfennigstorf
    Reviewed-by: Daniel Lorenz
    Tested-by: Daniel Lorenz
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn

commit ec3891d8d4e339d8319428211207e6201be9fd73
Author: Thomas Maroschik <*****>
Date:   Wed Oct 17 21:18:26 2012 +0200

    [TASK][WIP] Move non class code back to source files
    Change-Id: I620d2e61860142cdc89cc83474c95542799961c0

commit 554e8f890dcc0dd86a27518b58e2b54be26fd37e
Author: Thomas Maroschik <*****>
Date:   Wed Oct 17 22:20:17 2012 +0200

    [TASK] Namespace classes
    Change-Id: Ia7432e1c923826ed58206bca15fb94509adbd508

commit 547ef7f60f39c6bfcb0376e5e76070da85860098
Author: Arvid Jakobsson <*****>
Date:   Mon Sep 17 21:25:51 2012 +0200

    [TASK] Remove superfluous parenthesis in sysexts
    Superfluous brackets in fluid after namespaces move
    Change ("a" . "b") . "c" into "a" . "b" . "c" using the lex-pass tool.
    Resolves: #41016
    Related: #40095
    Releases: 6.0
    Change-Id: I64741473cb24eda343f0576ebd1a0f1846dfc3f8
    Reviewed-by: Oliver Hader
    Tested-by: Oliver Hader

commit 9d13dedf017b614b834261b1bf5d4acb2201f1d4
Author: Alexander Schnitzler <*****>
Date:   Fri Nov 16 19:49:02 2012 +0100

    [CLEANUP] Replace FLOW3 with TYPO3 Flow
    Releases: 6.0
    Fixes: #43036
    Change-Id: I62df23587301b4cde3ddeae3686b34f54fe1182e
    Reviewed-by: Alexander Schnitzler
    Tested-by: Alexander Schnitzler

commit 9d46e6932d35c79bf87c96fa38b8e537c4192f23
Author: Alexander Schnitzler <*****>
Date:   Tue Nov 20 16:27:02 2012 +0100

    [CLEANUP] Adjust code to CGL and fix small namespace bugs
    * whitespaces, tabs and blank line issues
    * bool -> boolean
    * int -> integer
    * fix wrong namespace annotations
    Fixes: #43157
    Releases: 6.0
    Change-Id: I8397948e19248db029d8efd1555ee56e4982742d
    Reviewed-by: Helmut Hummel
    Tested-by: Helmut Hummel

commit 8af3edadb2740457289abbdec4a5c351574e906e
Author: Francois Suter <*****>
Date:   Fri Aug 23 18:32:05 2013 +0200

    [FEATURE] Render icon with button view helper
    Fluid is currently lacking a view helper to render a skinned icon.
    By making the button icon view helper accept an empty URI as an
    argument, we let it render an unlinked icon, rather than adding
    a new view helper with very similar code.
    This patch also cleans up the class phpDoc block, which
    contained several errors.
    Resolves: #51305
    Releases: 6.2
    Change-Id: I74b1dc3346e20c9094313a2da451bcb6c1f60f29
    Reviewed-by: Frans Saris
    Reviewed-by: Wouter Wolters
    Tested-by: Wouter Wolters
    Reviewed-by: Stefan Neufeind
    Tested-by: Stefan Neufeind

commit 77f29a3c69a7cbb27b34072754aa503bace6c9f1
Author: Christian Kuhn <*****>
Date:   Tue Oct 1 14:40:56 2013 +0200

    [TASK] Remove closing PHP tags
    Change-Id: Iaa92566c53301e49396fc9fb26b0b339c48d567b
    Resolves: #52360
    Releases: 6.2
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn
    Reviewed-by: Ernesto Baschny
    Tested-by: Ernesto Baschny
    Reviewed-by: Anja Leichsenring
    Tested-by: Anja Leichsenring

commit fb5bddc9d95631384d5551804c9ada6183d19314
Author: Stefan Neufeind <*****>
Date:   Mon Nov 11 23:43:29 2013 +0100

    [BUGFIX] Make be.buttons.icon-ViewHelper extensible
    Many of the standard-ViewHelpers (tag-based) at least support
    additionalAttributes. Introduce this for be.buttons.icon as well
    to allow for attributes like onclick or target. Those arguments
    will be assigned to the surrounding a-tag if an uri is specified.
    Change-Id: I0b8ef12842a818ed5d49437a003287aff9b08f13
    Resolves: #53538
    Releases: 6.2, 6.1, 6.0
    Reviewed-by: Eric Chavaillaz
    Tested-by: Eric Chavaillaz
    Reviewed-by: Pascal Dürsteler
    Tested-by: Pascal Dürsteler
    Reviewed-by: Markus Klein
    Tested-by: Markus Klein

commit 7587e0e296cb9bfb87d9fe658c7378c835427979
Author: Markus Klein <*****>
Date:   Mon Nov 18 11:42:02 2013 +0100

    [BUGFIX] additionalAttributes for be.buttons.icon-VH misses hsc
    The values of the additional attributes for the backend icon viewhelper
    need to be processed through htmlspecialchars().
    Resolves: #53711
    Releases: 6.2, 6.1, 6.0
    Change-Id: I89794c77ad1bb7bad99517e24ae7345e0803616e
    Reviewed-by: Wouter Wolters
    Reviewed-by: Eric Chavaillaz
    Tested-by: Eric Chavaillaz
    Reviewed-by: Marc Bastian Heinrichs
    Tested-by: Marc Bastian Heinrichs

commit 023d35ec53e23bef0e77f07bfc2e0cd7f5386ec4
Author: Thomas Luzat <*****>
Date:   Wed Mar 5 12:15:09 2014 +0100

    [BUGFIX] Fix executable permissions on files
    A large number of files were stored with executable permissions. This
    may be a (minor) security risk and can be confusing. The patch removes
    the executable permissions on all files but:
    * typo3/cli_dispatch.phpsh
    * typo3/
    * typo3/
    Resolves: #56571
    Releases: 6.2
    Change-Id: Ib6a9fb19fe716d7d5405d5a7120b50269bdbf5f8
    Reviewed-by: Xavier Perseguers
    Tested-by: Xavier Perseguers
    Reviewed-by: Helmut Hummel
    Tested-by: Helmut Hummel