Is it difficult to setup all controllers in an application to:
1.) Check for the existence of a javascript file with the same name as the controller, and automatically include it in the view output?
2.) Do the same with CSS files? Load them IF they exist?
3.) Perhaps do the same if a Model exists...
I'd like the framework to proceed without complaint if a file does not exist.
I know this is possible, but what would be involved? How simple would this be in Fuel?
Would you simply copy the controller file from the framework core to a library folder in your application and extend it to include this functionality?
I'm brand new to Fuel, but am considering using it for a new CMS application.
Thank you.
Excellent. Thank you.
If I did this in the base controllers constructor, Would I then have to make sure and $view->set('auto_js',$this->auto_js);
for the particular view that I load in my action? Or could I just do that in the before(), or in the after() ?