Welcome Guest, Not a member yet? Register   Sign In
AUTOLOADING JAVASCRIPT AND CSS?
#1

[eluser]Unknown[/eluser]
On a somewhat related topic to what I posted earlier:

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 CI?
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?

Thank you.




Theme © iAndrew 2016 - Forum software by © MyBB