Answer the question
In order to leave comments, you need to log in
How to wrap the buttons of the Nav widget in the mobile version into one button?
In the Nav::widget widget, buttons are drawn with the priorities of which user sees these buttons.
How to wrap buttons into one button like in bootstrap
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
public function run()
{
return Nav::widget([
'options' => ['class' => 'nav nav-pills headerNav'],
'items' => [
['label' => 'Партнеры', 'url' => ['partners/index'], 'visible' => Yii::$app->user->can('admin')],
['label' => 'Аналитика', 'url' => ['site/analytics'], 'visible' => Yii::$app->user->can('admin')],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question