Module on subdomain and links to other modules from it

dkorpar
Member | 135
+
0
-

We decided to put one Module in application to subdomain.
and then in RouterFactory we have

		$router = new RouteList();
		$router[] = new Route('//subdomain.%domain%/<presenter>/<action>/<id>', [
			'presenter' => 'Default',
			'action' => 'default',
			'id' => NULL,
			'module' => 'Module1',
		]);

		$router[] = new Route('<presenter>/<action>/<id>', [
			'presenter' => 'Default',
			'action' => 'default',
			'id' => NULL,
			'module' => 'Module2',
		]);

if in Module 1 I'm using plink “:Module2:Article:default” url won't be %domain%/article/
but subdomain.%domain%/article/
What's correct approach here and can it even work?

I tried also with

$router[] = new Route('//%domain%/<presenter>/<action>/<id>', [
			'presenter' => 'Default',
			'action' => 'default',
			'id' => NULL,
			'module' => 'Module2',
		]);

it's same