URL format when using modules

mrcosgrove
Member | 11
+
0
-

Hi,

I have set up a site using modules, so the directory structure is : app/Modules/Home/Presenter

In order to access the presenters, the url ends up looking like : http://domain.com/home.signout

If there a way in Nette Application to change the format of this so that it accepts http://domain.com/home/signout instead?

Rick Strafy
Nette Blogger | 81
+
0
-

How is your router configured?

Btw look at https://github.com/…at-file-blog, there is configured presenter mapping (config/main.neon), router (app/Router/RouterFactory.php) and also presenter with logout action (app/Module/Front/BaseFrontPresenter.php)

mrcosgrove
Member | 11
+
0
-

The router is pretty much standard (still very new to Nette so bear with me :) )

$router = new RouteList;
$router->addRoute(‘<presenter>/<action>[/<id>]’, ‘Home:Home:default’);

Mapping…
application:
errorPresenter: Error
mapping:
*: App\Modules\*\Presenters\*Presenter

Last edited by mrcosgrove (2022-11-23 17:17)