12-16-2008, 01:54 PM
[eluser]freshface[/eluser]
As the title says, how would you structure your code and handle an advanced cms in CI.
How I would do it:
There will be a public frontend (the website) and the backend (admin part).
So i would have 2 applications running on one CI system.
For the backend i would work with modules (HMVC).
Module folder structure (ex. blog)
-Blog
-- module_settings.php // contains some config settings like (is $is_in_main_nav = TRUE/FALSE)
-- Controllers // this wil contain the code for posting, editting, deleting, ..
-- Models // Models to handle the queries
-- View // Views
-- Languages // translations for the module
-- Routes // If the blog module needs a custom route
-- Settings // There will be settings for this module (like trackbacks, allow comments, advanced markup, ...)
Each module will have the same structure (maybe it could be better?)
When I go to site.com/backend/modules/blog the blog module would need to show up.
When I go to site.com/backend/settings/blog i should see the settings.
But I am curious on your approach and you would handle something like this.
Keep in mind that something like this needs to be clear and easy modify-able and flexable.
This is for the backend part.
As the title says, how would you structure your code and handle an advanced cms in CI.
How I would do it:
There will be a public frontend (the website) and the backend (admin part).
So i would have 2 applications running on one CI system.
For the backend i would work with modules (HMVC).
Module folder structure (ex. blog)
-Blog
-- module_settings.php // contains some config settings like (is $is_in_main_nav = TRUE/FALSE)
-- Controllers // this wil contain the code for posting, editting, deleting, ..
-- Models // Models to handle the queries
-- View // Views
-- Languages // translations for the module
-- Routes // If the blog module needs a custom route
-- Settings // There will be settings for this module (like trackbacks, allow comments, advanced markup, ...)
Each module will have the same structure (maybe it could be better?)
When I go to site.com/backend/modules/blog the blog module would need to show up.
When I go to site.com/backend/settings/blog i should see the settings.
But I am curious on your approach and you would handle something like this.
Keep in mind that something like this needs to be clear and easy modify-able and flexable.
This is for the backend part.