Hello
Need some help with this situation:
- I have a Layout.php page, that contains the page structure, and several variables, one of them it’s the $content.
The $content var it’s “filled” in the requested pages, the normal behavior of a template…
So my problem is for example in one of the pages i have to use jQUery (validation/ui/whatever), so if i use the script tags only in the layout, the page will generate errors. If i add in the page the scripts tags, it will duplicate the js files (current file and layout) in some cases wired behavior because of the load order and it’s a bad practice. If i try to load them on the fly, while checking if it’s required or not in some pages i have errors, because the scripts are loaded asynchronous and aren’t ready when i need them…
So what’s the best way to solve this?
Sync script load on-the-fly (possible?)?