Add a link to extension resource in TYPO3?

532 Views Asked by At

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?

1

There are 1 best solutions below

2
On BEST 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.