It does not show Dropdown Menu in main.php

When I log in as a user not as an administrator it shows me a drop-down menu. works fine in all controllers except site / index. In the site / index it shows the logged in user but does not give the option to display the items.

main.php

<?php NavBar::begin([ 'brandLabel' => Yii::$app->name, 'options' => [ 'class' => 'titulo', ], 'brandUrl' => Yii::$app->homeUrl, 'options' => [ 'class' => 'navbar-inverse navbar-fixed-top', ], ]);
 if(Yii::$app->user->isGuest){
 
        echo Nav::widget([
            'options' => ['class' => 'navbar-nav navbar-right'],
            'items' => [
               
                 
                ['label' => 'Entrar', 'url' => ['/site/login']],
                ['label' => 'Regístrate', 'url' => ['/site/preregistro']],
     
            ],
       ]);
  
     
}

if(!Yii::$app->user->isGuest && User::isUserAdmin(Yii::$app->user->identity->getId())){


  echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-right'],
    'items' => [


      ['label' => 'Talentos', 'url' => ['/talentos']],

      ['label' => 'Registro', 'url' => ['/site/register']],

      '<li>'
      . Html::beginForm(['/site/logout'], 'post')
      . Html::submitButton(
        'Logout (' . Yii::$app->user->identity->username . ')',
        ['class' => 'btn btn-link logout']
      )
      . Html::endForm()
      . '</li>'
    ],
  ]);

}

if(!Yii::$app->user->isGuest && User::isUserUsuario(Yii::$app->user->identity->getId())){

  echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-right'],
    'items' => [

        ['label' =>  Yii::$app->user->identity->username ,'url' => ['#'],
           'template' => '<a href="{url}" >{label}<i class="fa fa-angle-left pull-right"></i></a>',
                                  //does not show these items in the site / index
           'items' => [
                         ['label' => 'Talentos', 'url' => ['/site/index'],'linkOptions' => ['target'=>'_blank']],
                         ['label' => 'Mi Perfil', 'url' => ['/talentos/perfil']],
                         ['label' => 'Modificar contraseña', 'url' => ['/site/perfil']],
                         '<li">'
                         . Html::beginForm(['/site/logout'], 'post')
                         . Html::submitButton(
                           '<a style="color:#9d9d9d;text-decoration:none;font-size:14px;padding:5px 15px 5px 5px">Cerrar Sesión</a>',
                           ['class' => 'btn btn-link']
                         )
                         . Html::endForm()
                         . '</li>'

                     ],
        ],
    ],

  ]);
}     

NavBar::end();

?>

<div>
    <?= Breadcrumbs::widget([
        'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
    ]) ?>
    <?= Alert::widget() ?>
    <?= $content ?>
</div>

This dropdown is supposed to appear in the Navbar?