[TYPO3-mvc] Translate f:uri.resource from "EXT:tx_ext..." to correct path?

Gianluca Strafella gianluca.strafella at webformat.com
Wed Nov 13 09:07:41 CET 2013


Hi Jan, with notation:

{f:uri.resource path: '{settings.tx_ext_js}'}

the view helper  (ResourceViewHelper) , assumes that the "resource" is 
located in path "Resources/Public" of your extention: 
typo3conf/ext/your_ext_key/Resources/Public/

So, in settings.tx_ext_js, you should only have this path: "Js/script.js".
In this way, ResourceViewHelper will build this path:

typo3conf/ext/your_ext_key/Resources/Public/Js/script.js

See also:

https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php

Regards,

Gianluca Strafella

Software Developer
gianluca.strafella at webformat.com
Tel.   +39-0427-926.389

WEBFORMAT srl – www.webformat.com
Via Mecenate, 76 - 20138 MILANO
Corte Europa, 12 - 33097 SPILIMBERGO (PN)


Il 12/11/2013 01:07, Jan Kornblum ha scritto:
> Dear newsgroup,
>
> in a backend module i would like to embed javascript using
> <f:be.container>:
>
> <f:be.container
>      addJsFile="{f:uri.resource(path: '{settings.tx_ext_js}')}">
> </f:be.container>
>
> ...where "settings.tx_ext_js" contains the string
> "EXT:my_ext/Resources/Public/Js/script.js".
>
> How can i "translate" the "EXT:my_ext..." notation to a correct path?
>
> Kind regards, Jan
>
>


More information about the TYPO3-project-typo3v4mvc mailing list