MyBB Community Forums

Full Version: Loading of javascript etc via an asset manager
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Many frameworks and pieces of software allow the loading of external resources (such as javascript and stylesheets) via an asset manager. I have no idea if Yii/Twig include this type of thing, but I think it would be extremely useful especially for plugin developers wishing to include custom javascript files. The syntax might be something like the following:

Asset::js(array('jquery.js', 'script.js'));

As I said, this may well be available as default in Yii, but I'd certainly love to see a similar system if not. It also ensures valid HTML code is used to include the assets too.