RE: [coldbox:16131] [coldbox-3.5.2] View-specific css/js assets

Nothing wrong with the way you’re doing it at all. I typically just put the HTMLHelper calls right there in my view that needs the JS. I’ve also seen people put the HTMLHelper calls in their handler and just set sendToHeader = true.

Aaron also has a post which shows how to modify the HTMLHelper plugin to store up the assets needed and then output them when and where you need them. Not too unlike what you’ve done, but he’s wrapped up the logic of persisting the list of assets inside the plugin a bit more.

http://aarongreenlee.com/share/coldbox-resource-asset-management

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Thanks Brad…I was afraid I’d missed something in the framework that took care of that and was doing unnecessary work.