Closed theDyingMountain closed 5 years ago
I ran into the same issue - though I am currently testing a possible fix.
Haven't checked the code but it sounds like it is a Contao issue -- the Controller::getFrontendModule should handle the templating.
Haven't checked the code but it sounds like it is a Contao issue -- the Controller::getFrontendModule should handle the templating.
Yes and no. Which template to use also depends on the layout and theme. But your hook is executed before Contao sets the template group according to the theme. So if your custom template is within a theme folder, it cannot be used.
This code would need to be executed, before you generate the content element or module for the AJAX reponse:
Thx for fixing this.
I use the ajax request for the newsletter form. In the module i choose an individual newsletter template, but after the ajax reload the "nl_default" template is loaded. I think it's because the compile function in "ModuleSubscribe" is not called, only the generate method.