From c7048abcf2304b3561325dbc164ef48f13ac8c43 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Fri, 25 May 2018 18:01:49 +0300 Subject: [PATCH] - nav widget without class nav --- frontend/views/layouts/main.php | 6 +----- frontend/widgets/Nav.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 frontend/widgets/Nav.php diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index f9ce0e7..1b97995 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -15,7 +15,6 @@ use artbox\core\models\Feedback; use artbox\core\models\PageCategory; use artbox\core\models\User; - use common\models\page\Category; use common\models\Service; use common\models\Settings; use frontend\assets\AppAsset; @@ -23,7 +22,7 @@ use frontend\assets\SliderAsset; use frontend\widgets\ArtboxModalWidget; use frontend\widgets\LanguageWidget; - use yii\bootstrap\Nav; + use frontend\widgets\Nav; use yii\db\ActiveQuery; use yii\web\View; @@ -177,9 +176,6 @@ $items, - 'options' => [ - 'class' => '', - ], 'activateItems' => false, ] ); ?> diff --git a/frontend/widgets/Nav.php b/frontend/widgets/Nav.php new file mode 100644 index 0000000..6e3c30a --- /dev/null +++ b/frontend/widgets/Nav.php @@ -0,0 +1,28 @@ +route === null && \Yii::$app->controller !== null) { + $this->route = \Yii::$app->controller->getRoute(); + } + if ($this->params === null) { + $this->params = \Yii::$app->request->getQueryParams(); + } + if ($this->dropDownCaret === null) { + $this->dropDownCaret = ''; + } + Html::addCssClass($this->options, []); + } + } \ No newline at end of file -- libgit2 0.21.4