2012-05-03, 08:29 PM
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:
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.
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.