Welcome Guest, Not a member yet? Register   Sign In
Custom and standard view files

Hi, I've been using CI for several years now. One thing I'd love to be able to do is to define multiple places where views (and other files, if possible) can come from.

+ system
| + application
|    +  views
|    +  controllers
|    +  ... etc ...
| custom
| + system
|   + application
|     + views
|     + controllers
|     + ... etc ...

I'm not wedded to this particular structure, but the idea I want is that, when loading a view, it would first look to the custom directory and THEN to the original system directory. The reason is that I want to be able to deploy the same application base to multiple server installations, and be able to place all my installation-specific views etc in the "custom" folder. The idea I'm going for is very similar to the java CLASSPATH (or even plain PHP include_path), where it will look at multiple places for the file.

Now, I can see various ways to do something like this, but all of them involve either hacking CI files, overriding them in non-supported ways, etc. I would like to know if CI has a recommended way of doing this. Thanks for your thoughts.



Maybe that touches on what you're looking for.

Thank you for the quick reply. Yes, that does exactly what I want. When I upgraded to 2.1.2, I found it. Thanks!

Theme © iAndrew 2016 - Forum software by © MyBB