From what i understand, to get the routes i want using the automatic routing in Fuel i would have to lay my files out like this:
application/
modules/
pages/
classes/
controller/
pages.php (containling methods for CRUD)
settings/
classes/
controller/
settings.php (top 'settings page')
pages.php (settings page for 'pages' functionality)
I know you can specify routes using config files inside each module, but from what i understood the routes in modules/pages would only be 'auto-loaded' when the user navigates to /pages. The routes for each module in my application all need to be accessible by other modules.
My aim is to keep everything, including the 'settings' page inside the 'page' module.
Is my understanding of the above wrong? If so this could be where im getting lost.
The reason i have named my modules in this way:
application/
modules/
content/
content_pages/
content_blog/
content_forums/ etc...
is purely for organisational and reading purposes, the 'content' area of this system will have between 10-15 modules in total, and the 'content' area is just one of 20'ish areas in the system, it makes it easier for me to manage.
These modules could be added / removed in any combination depending on the clients needs, the clients themselfs wont be installing the 'modules' or 'plugins' as i've refered to them above, so there is no need for any setup controllers, this will all be handled by a dev team.
I tried your suggestion about the 404 in the routes config, but i get the following error:
"preg_match(): Compilation failed: nothing to repeat at offset 1"
the routes.php file contains:
<?php
return array(
'_root_' => 'login', // The default route
'_404_' => 'errormsg/show404', // The main 404 route
'*'=>'errormsg/show404'
);
errormsg is a simple controller that shows some of the error pages.
i have also tried setting it to 'base/404' and get the same error. I was hoping this would route any undefined & unmatched routes to a 404 page, is this what was meant to happen?
I hope this makes sense, i don't explain things very well sometimes :P
It looks like you're new here. If you want to get involved, click one of these buttons!