===== Akelos Modules =====
$Map->connect('/admin/:controller/:action/:id', array('controller' => 'dashboard', 'action' => 'index', 'module' => 'admin'));
before other routes.
==== Controller ====
Now you can place the dashboard controller at **app/controllers/admin/dashboard_controller.php** declaring the controller with a new convention. Prefix the controller name with the **ModuleName + "_""**
class Admin_DashboardController extends AdminController
{
//...
}
you can either extend from the base ''ApplicationController'' or from a module specific controller like we did on the code above. Akelos will look for a controller named after your module in this case at **app/controllers/admin_controller.php** and if exists it will be loaded so your **Admin_DashboardController** can extend from it
class AdminController extends ApplicationController
{
}
==== Views ====
Akelos will look for views at be at **/app/views/admin/controller_name**, and for helpers at **/app/helpers/admin/**
If you want to have a module specific layout Akelos will set by default **app/views/layouts/admin.tpl** for you.
==== Migrations ====
Installers can also be scoped to modules. In this case we could have several installers/migrations at **app/installers/admin/*_installer.php**. The only requirement right now is that you tell the installer which module it belongs to like
''app/installers/admin/user_installer.php''
class UserInstaller extends AkInstaller
{
var $module = 'admin';
// ***
}
==== Generators ====
The controller generator supports generating modular controllers doing like this:
./script/generate controller Admin::Users