1

I'm trying to get an extension/plugin on a page to use a different template from the one its hardcoded with.

I made an html template stored in: typo3conf/ext/myextension/pi1/new_extension_template.html

I made a typoscript template object in the root of my site (so it would definitely get picked up). In it, I have defined the following simple Typoscript (names changed for demonstration)

plugin.tx_myextension_pi1 {
     templateFile = typo3conf/ext/myextension/pi1/new_extension_template.html
}

However when I load the page containing the plugin, I get a "no typoscript template found" error on that black TYPO3 error page.

I have tried a bunch of alternative ways in case the syntax was wrong but the above worked for me when working with the tt_news plugin.

E.g I have tried these without success too:

templateFile.file = typo3conf/ext/myextension/pi1/new_extension_template.html
...
tempfile.template_file = typo3conf/ext/myextension/pi1/new_extension_template.html

Any ideas what I'm doing wrong? Can html templates stored in typo3conf be called via typoscript stored outside the plugin?

I'm thinking perhaps html template files would have to be stored in fileadmin/plugin_templates/ for this to work.

1 Answer 1

1

You are mixing things: no typoscript template found means that on the page you inserted the plugin there is no TS template available.

Page with plugin isn't nested under the main page (which - as I assume - has main TS template and is displayed properly), so just drag it into the main page, or create new TS template on its level.

you can check it with Template module

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.