• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom and standard view files

#1
[eluser]Unknown[/eluser]
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.

Code:
+ 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.

Gary

#2
[eluser]Aken[/eluser]
http://ellislab.com/forums/viewthread/220307/

Maybe that touches on what you're looking for.

#3
[eluser]Unknown[/eluser]
Thank you for the quick reply. Yes, that does exactly what I want. When I upgraded to 2.1.2, I found it. Thanks!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.