I am loading some additional Javascript in the template of the newAction()
of my controller:
Templates/Controller/New.html
<f:section name="FooterAssets">
jQuery(document).ready(function ($) {
// do something
});
</f:section>
This works perfectly fine, but as soon as an error occurs when I save the record, the FooterAssets
assets are not loaded anymore. So somehow the createAction()
does not load/add the FooterAssets
.
Is there a way to load the FooterAssets
if an error occurs when saving a record?
And a more general question:
Are the HeaderAssets
and FooterAssets
the recomended way to include specific Javascript or CSS for an controller action?