1

Working with Bootstrap NavBar widget for Yii2. I want to generate this markup:

<!-- Navigation panel -->
<nav class="main-nav dark transparent stick-fixed">
  <div class="full-wrapper relative clearfix">
    <!-- Logo ( * your text or image into link tag *) -->
    <div class="nav-logo-wrap local-scroll">
      <a href="#top" class="logo">
        <img src="images/logo-white.png" alt="" />
      </a>
    </div>
    <div class="mobile-nav">
      <i class="fa fa-bars"></i>
    </div>
    <!-- Main Menu -->
    <div class="inner-nav desktop-nav">
      <ul class="clearlist scroll-nav local-scroll">
        <li class="active"><a href="#home">Home</a></li>
        <li><a href="#about">About</a></li>
        <li>
          <a href="#" class="mn-has-sub">Eng <i class="fa fa-angle-down"></i</a
          <ul class="mn-sub">
              <li><a href="">English</a></li>
              <li><a href="">France</a></li>
              <li><a href="">Germany</a></li>
         </ul>
        </li>
      </ul>
    </div>
  </div>
</nav>
<!-- End Navigation panel -->

And here is my NavBar widget looks like:

<?php NavBar::begin([
    'options' => ['class' => ' main-nav dark transparent stick-fixed'],
    'innerContainerOptions' => ['class' => ' full-wrapper relative clearfix'],
    'brandOptions' => ['class' => 'logo'],
    'brandLabel' => '<img src="/images/logo-white.png" alt=""/>',
    'brandUrl' => "/"]);
?>
<div class="mobile-nav">
   <i class="fa fa-bars"></i>
</div>
<div class="inner-nav desktop-nav">
   Language dropdown
   <?php
   echo Nav::widget([
       'encodeLabels' => false,
       'options' => ['class' => 'clearlist scroll-nav local-scroll'],
       'items' => [
           [
               'label' => Yii::$app->language,
               'items' => $availableLangs
           ]
       ]
   ]);

   NavBar::end();
   ?>
</div>

Where is my fault?

4
  • 3
    And what you get? show the result you obtain please...... Commented Sep 19, 2015 at 7:19
  • link Commented Sep 19, 2015 at 7:25
  • 2
    Why don't you paste your result into your question? Commented Sep 20, 2015 at 14:17
  • 1
    may be this can help stackoverflow.com/questions/29950716/… Commented Sep 21, 2015 at 12:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.