diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 84dfa88..4838ec3 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -307,41 +307,14 @@ $this->registerMetaTag( 'url' => Url::to(['package/index']), ]; - # определяю, кому из итемов присвоить class="active' - $itemKey=0; - $test=[]; - foreach ($items as $key => $item) - { - - if(strpos(\Yii::$app->request->url,$item['url'])!==false ) - { - $test[$key]['label']=$item['label']; - $test[$key]['options'] = [ 'class' => 'active' ]; - $test[$key]['url']= false; - - - } - elseif( \Yii::$app->request->url=='/' && $item['label']==\Yii::t('app', 'Prices')) - { - $test[$key]['label']=$item['label']; - $test[$key]['options'] = [ 'class' => 'active' ]; - $test[$key]['url']= Url::to(['site/prices']); - - } - else - { - $test[$key]['label']=$item['label']; - $test[$key]['url']=$item['url']; - } - - } + ?> $test, + 'items' => $items, 'activateItems' => false, ] ); ?> -- libgit2 0.21.4