[eluser]CoffeeBeanDesign[/eluser]
Hi Jedd,
Thanks for your reply. Indeed, the tenor of your response is appropriate to the futility of my question. I accept that this is purely an aesthetic question.
I've currently got something like the following :
- system
- assets
- application
- controllers
- backend ( dir )
- content
- media
- users
- pages
- jobs
- news
- models
- backend ( dir )
- content
- media
- users
- content
- views
- backend ( dir )
- dataset
- forms
- main
- jobs
- news
I know about the 'backend for each controller in the same subfolder system' but my CMS doesn't match that architecture. So all I was thinking was, wouldn't it be nice if I could put the three backend folders in a single subfolder like this :
- application
- backend
- controllers
- models
- views
- helpers
- controllers
- models
- views
- etc.
Since my original post I have (wasted/spent??) all morning looking into it and to achieve exactly what I want I needed to change Router.php, Loader.php and CodeIgniter.php.
This could possibly be the most pointless modification to CI but I went ahead and did it. What else are Saturday mornings for??
I am no CI expert and there may be a gaping hole in my logic but in brief, this is what I have done :
Set a config array called 'subapps'
Changed _validate_request in Router.php to check to see whether $segments[0] is a subapp
Created fetch_subapp() function to return the subapp folder
Changed include request in CodeIgniter.php to include $RTR->fetch_subapp()
Changed Loader.php to look in the subapp folders first for helpers, plugins, views & models
If no file is found in the subapp folders it still looks in the default folders
I guess I could look into amending the Config class to look for a subapp specific config folder... and perhaps subapp specific errors pages...??
I may have broken CI in the process ( all seems to working OK so far ). I would be very grateful if an expert out there would cast their eyes over my changes.