Skip to content

Commit

Permalink
literally all routing except /o-nas/organizatori works
Browse files Browse the repository at this point in the history
  • Loading branch information
vanekm committed Aug 23, 2024
1 parent 10a0337 commit 159a4b9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/Modules/Fykos/Core/BasePresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ protected function getNavItems(): array
[],
[
new NavItem(new PageTitle($this->csen('Co je FYKOS?', 'What Is FYKOS?')), ':Default:About:default'),
new NavItem(new PageTitle($this->csen('Organizátoři', 'Organizers')), ':Default:About:Organizers'),
new NavItem(new PageTitle($this->csen('Historie', 'History')), ':Default:About:History'),
new NavItem(new PageTitle($this->csen('Kontakt', 'Contact')), ':Default:About:Contact'),
new NavItem(new PageTitle($this->csen('Organizátoři', 'Organizers')), ':Default:About:organizers'),
new NavItem(new PageTitle($this->csen('Historie', 'History')), ':Default:About:history'),
new NavItem(new PageTitle($this->csen('Kontakt', 'Contact')), ':Default:About:contact'),
],
);

Expand All @@ -44,7 +44,7 @@ protected function getNavItems(): array
[],
[
new NavItem(new PageTitle($this->csen('Základní informace', 'Basic Information')), ':Events:Fykos:'),
new NavItem(new PageTitle($this->csen('Pravidla', 'Rules')), ':Events:Fykos:Rules'),
new NavItem(new PageTitle($this->csen('Pravidla', 'Rules')), ':Events:Fykos:rules'),
new NavItem(
new PageTitle($this->csen('Jak psát řešení', 'How to Write Solutions')),
':Events:Fykos:TexTutorial'
Expand Down
22 changes: 17 additions & 5 deletions app/RouterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ public static function createFykosRouter(?array $domainList, array $routerMappin
{
$router = new RouteList();

$router->addRoute('//<domain>/<lang events|akce>/[<presenter>[/<action>]]', [
'module' => 'Events',
'presenter' => 'Default',
'action' => 'default',
'lang' => ['filterTable' => [
'akce' => "cs",
'events' => "en",
]],
null => self::useTranslateFilter($domainList, $routerMapping['events']),
]);

$router->addRoute('//<domain>/<lang results|poradi>[/<year ([0-9]{1,2})>]', [
'module' => 'Default',
'presenter' => 'Results',
Expand All @@ -222,11 +233,12 @@ public static function createFykosRouter(?array $domainList, array $routerMappin
null => self::useTranslateFilter($domainList, $routerMapping['default']),
]);

$router->addRoute('//<domain>/<module events>/[<presenter>[/<action>]]', [
'presenter' => 'Default',
'action' => 'default',
null => self::useTranslateFilter($domainList, $routerMapping['events']),
]);

// $router->addRoute('//<domain>/<module events>/[<presenter>[/<action>]]', [
// 'presenter' => 'Default',
// 'action' => 'default',
// null => self::useTranslateFilter($domainList, $routerMapping['events']),
// ]);

$router->withModule('Default')
->addRoute('//<domain>/<presenter>[/<action>]', [
Expand Down

0 comments on commit 159a4b9

Please sign in to comment.