From 3b376a55bd7b341573a30ee18f3f772df6a7717e Mon Sep 17 00:00:00 2001 From: Eugeny Galkovskiy Date: Mon, 7 Nov 2016 14:50:34 +0200 Subject: [PATCH] 123 --- src/app/frontend/controllers/PageController.php | 14 +++++--------- www/index.php | 13 +++++++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/app/frontend/controllers/PageController.php b/src/app/frontend/controllers/PageController.php index d029db4..8add771 100644 --- a/src/app/frontend/controllers/PageController.php +++ b/src/app/frontend/controllers/PageController.php @@ -234,14 +234,7 @@ class PageController extends \controllers\ControllerBase 'action' => 'error404' ]); } - - - if($type==='pro_companiu') - $this->view->setMainView('about_ukr'); - if($type==='o-kompanii') - $this->view->setMainView('about_ukr'); - elseif($type==='pro_companiu_en') - $this->view->setMainView('about_eng'); + } @@ -1420,7 +1413,10 @@ class PageController extends \controllers\ControllerBase die(); } - + public function aboutuaAction($type){ + $this->view->setMainView('about_ukr'); + } + public function compareItemsAction( $url, $subtype, $compare_ids) { $params = $this->dispatcher->getParams(); diff --git a/www/index.php b/www/index.php index cd7ae4f..f971fa8 100644 --- a/www/index.php +++ b/www/index.php @@ -1744,6 +1744,19 @@ try ] ) ->setName( 'faq' ); + + + $router->add + ( + '/about{language:([/][a-z]{2})?}', + [ + 'controller' => 'page', + 'action' => 'aboutua', + ] + ) + ->setName( 'aboutua' ); + + return $router; }, true ); -- libgit2 0.21.4