S
S
Sergey Beloventsev2016-10-06 10:55:22
Yii
Sergey Beloventsev, 2016-10-06 10:55:22

How can this be done with the nav widget?

in fact, it is necessary that in the end the output would be like this html

<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Для него </a>
    <ul class="dropdown-menu">
      <ul class="col-ld-16 col-md-16 col-sm-24">
        <ul class="col-lg-8 col-md-8 col-sm-24">
          <li><a href="#">Действие</a></li>
          <li><a href="#">Другое действие</a></li>
        </ul>
        <ul class="col-lg-8 col-md-8 col-sm-24">
          <li><a href="#">Что-то еще</a></li>
          <li><a href="#">Действие</a></li>
        </ul>
        <ul class="col-lg-8 col-md-8 col-sm-24">
          <li><a href="#">Другое действие</a></li>
          <li><a href="#">Что-то еще</a></li>
        </ul>
      </ul>
      <ul class="col-lg-8 col-md-8 col-sm-24 nomobile">
        <img src="image/menuAction.jpg" class="col-lg-10 col-md-10"/>
        <img src="image/menuAction2.jpg" class="col-lg-10 col-md-10 col-lg-offset-1 col-md-offset-1"/>
      </ul>
    </ul>
</li>

Is it possible to implement this in the nav widget or do I have to make the menu myself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-10-06
@slo_nik

Good morning.
As I understand it, you need to make a drop-down menu?
If yes, then like this:

echo Nav::widget([
        'options' => ['class' => 'navbar-nav navbar-right'],
        'items' => [
            ['label' => 'Home', 'url' => ['/site/index']],
            [
              'label' => 'About',
              'items' => [
                 ['label' => 'About1', 'url' => ['site/about1']],
                 ['label' => 'About2', 'url' => ['site/about2']]
              ]
            ],
    ]);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question