Learning advanced modules: the BLOG module
Hello,
I'm studying the BLOG module in order to better understand advanced modules, but I'm left scratching my head on how to actually interpret the blog's routing as in blog/config/blog_routes.php
$blog_controllers = array('posts', 'comments', 'categories', 'links', 'users');
foreach($blog_controllers as $c)
{
$route[FUEL_ROUTE.'blog/'.$c] = FUEL_FOLDER.'/module';
$route[FUEL_ROUTE.'blog/'.$c.'/(.*)'] = FUEL_FOLDER.'/module/$1';
}
What happens when i go to /fuel/blog/posts ? This route seems to redirect ALL trailing segments to fuel/module but i can't figure out what that means... Is it a way of telling Fuel to search for MODELS inside the module's folder with the same name as in the URI segment (i.e. /fuel/blog/posts goes to /fuel/blog/models/blog_posts_model.php ?)
I'm trying to understand what that "module" part does in the routes...
Thanks!
Comments