Ad

Add A Link To Extension Resource In TYPO3?

- 1 answer

I want to add link tags to the head so I can preload some font files in my site package.

I have tried using headerData but how can I get file path to EXT:my_site/Resources?

Ad

Answer

For any field in TypoScript that uses the getText data type, you can use path: for that. For example:

page.headerData.123 = TEXT
page.headerData.123.data = path:EXT:extension/Resources/Public/path/to/file
page.headerData.123.wrap = <tag property="|">

See https://docs.typo3.org/m/typo3/reference-typoscript/10.4/en-us/DataTypes/#path for more information.

Ad
source: stackoverflow.com
Ad