Documentation · ViewHelper reference

Uri / ResourceViewHelper

A view helper for creating URIs to resources.




(depending on current package)

  • Tag usage example

    <f:uri.resource path="foo" extensionName="NULL" absolute="1">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {f:uri.resource(path: 'foo', extensionName: 'NULL', absolute: 1)}


Argument Description Type

If set, an absolute URI is rendered


Target extension name. If not set, the current extension name will be used


The path and filename of the resource (relative to Public resource directory of the extension).

Required attribute

Revision history

commit 4c5b397673f833ff27a96a8c3d88457e9acc6e02
Author: Bastian Waidelich <*****>
Date:   Thu Sep 17 13:14:01 2009 +0000

    [+FEATURE] Fluid (Viewhelpers): Added uri.resource view helper

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 5a15461306135913eb4ab285243260097a74b969
Author: Sebastian Kurfürst <*****>
Date:   Thu Nov 5 10:32:57 2009 +0000

    [!!!][+BUGFIX] Fluid (ViewHelpers): FIxed the Resource ViewHelper to be in sync with FLOW3 again. This means that instead of writing <f:uri.resource>...</f:uri.resource>, you write <f:uri.resource path="..." /> or {f:uri.resource(path:'...')}. Resolves #5237.

commit 186bdaeac89820779f91853b830cc95d60c7ad58
Author: Bastian Waidelich <*****>
Date:   Tue Jul 13 09:42:26 2010 +0000

    [-TASK] Fluid: R*****@version annotation from all Fluid classes to ease the backporting process. Relates to #8835 (backported from Fluid package)

commit 7c4adb435f5739a8574b3c28d79993ec1cae4270
Author: Bastian Waidelich <*****>
Date:   Mon Jul 19 18:09:46 2010 +0000

    [~TASK] Fluid (ViewHelpers): Fixed BE support of the ViewHelpers cObject, format.crop, uri.resource. Relates to #8947
    [~TASK] Fluid (ViewHelpers): Added BE support in the ViewHelpers format.html and image. Relates to #8947

commit 472451987ca0530fa5828bb0b79fcafa2f905a35
Author: Bastian Waidelich <*****>
Date:   Fri Nov 19 20:58:09 2010 +0000

    [-TASK] Fluid: R*****@scope annotations as they are not used in v4

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 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 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 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 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 7efcf2a4948b971366ac13e5f2a3371f79bdca49
Author: Stefan Neufeind <*****>
Date:   Sun Dec 8 16:42:02 2013 +0100

    [TASK] Add tool-function to strip PATH_site-part of paths
    Avoid having to use the substr/strlen-magic.
    Also strlen(PATH_site) can be statically cached.
    Change-Id: I0ef942e331e2039e2ece9a55dd740db2a3896e2c
    Resolves: #54126
    Releases: 6.2
    Reviewed-by: Philipp Gampe
    Tested-by: Philipp Gampe
    Reviewed-by: Markus Klein
    Tested-by: Markus Klein