How to set default module
- kevin.waterson@gmail.com
- Member | 81
So, I have this structure:
app/
BlogModule
presenters
templates
AdminModule
presenters
templates
DefaultModule
presenters
templates
I would like to have the Default Module loaded when the site is accessed: eg https://example.com would load the DefaultModule.
Where is the default set?
Thanks
Kevin
- kevin.waterson@gmail.com
- Member | 81
Again, thank you good sir.
For those following, the solution is to edit the app/router/RouterFactory.php
file so that it looks like this:
<?php
namespace App;
use Nette;
use Nette\Application\Routers\Route;
use Nette\Application\Routers\RouteList;
final class RouterFactory
{
use Nette\StaticClass;
/**
* @return Nette\Application\IRouter
*/
public static function createRouter()
{
$router = new RouteList;
$router[] = new Route('<presenter>/<action>[/<id>]', 'Default:Default:default');
return $router;
}
}