Welcome Guest, Not a member yet? Register   Sign In
How to: backend and frontend on 1 CI installation
#11

[eluser]Phil Sturgeon[/eluser]
I am a big fan of the modular approach louis. Using HMVC or Matchbox you can just add an admin.php controller to each of your modules then set a route for admin/:any to $1/admin. Works nicely for a modular admin system.
#12

[eluser]moykan[/eluser]
I would like to comletely separate the backend from the frontend in HMVC structure too.
But i have some doubt if this is correctlly. For example i have these dir tree:


backend/modules/blog/controller
backend/modules/blog/view
backend/modules/blog/model
frontend/modules/pages/controller
frontend/modules/pages/view
frontend/modules/pages/model

the problem is that in backend and frontend there is config folder too, but i want that config files should be shared between backend and frontend, so in new installation i have to change just a couple of files in one config dir... do you have an idea on how to organize it or how can i configure the backend and frontend to use an external config folder?
Thank's a lot!
#13

[eluser]Phil Sturgeon[/eluser]
Luckily CI 2.0 supports packages, so read up in the documentation how they work. Set a common folder that shares models, libraries, helpers etc between front and back.
#14

[eluser]moykan[/eluser]
Thank you Phil for the fast reply, I will read the doc with attention!
When it will be ready I would like to show you the CMS made with CI.




Theme © iAndrew 2016 - Forum software by © MyBB