来自扩展的TYPO3图像

时间:2018-03-02 13:57:34

标签: typo3

我是一个错误的新手,并且想知道我如何在我的HTML模板文件中使用以下代码:

<img src="EXT:extension-name/Resources/Public/Images/Logo/logo-white.png" alt="logo.png">

期待你的回答,谢谢。

1 个答案:

答案 0 :(得分:2)

这不能在HTML文件中完成,但在Fluid模板文件中,您应该使用uri.resource viewhelper

<img src="{f:uri.resource(path: 'Images/Logo/logo-white.png')}" alt="Actual explanation of the logo content">

如果在Extbase插件中使用,则没有其他事可做。

对于使用FLUIDTEMPLATE content object的模板,您需要设置扩展名,例如使用extensionName: 'MyExt'作为参数:

<img src="{f:uri.resource(path: 'Images/Logo/logo-white.png', extensionName: 'MyExt')}" alt="Actual explanation of the logo content">

或者在TypoScript设置中使用controllerExtensionName