The simple way is also to maintain a xml/config file where you group sets of js and css files together and give them names. This way you can at any point in the Rendering pipeline define what js/css group this request belongs to and render the correct includes that way.
Still not as flexible as https://github.com/Shandem/ClientDependency which supports adding new files to a page at runtime, but sat least you don't need to create a ton of Templates.
Still not as flexible as https://github.com/Shandem/ClientDependency which supports adding new files to a page at runtime, but sat least you don't need to create a ton of Templates.