Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsed menu dropdown missing 1st level items #255

Open
ddt368 opened this issue Aug 14, 2019 · 0 comments
Open

Collapsed menu dropdown missing 1st level items #255

ddt368 opened this issue Aug 14, 2019 · 0 comments
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug

Comments

@ddt368
Copy link

ddt368 commented Aug 14, 2019

When using the NavBar collapse (for small screen) to convert Nav inline $menuItems to drop down list, which works, the variable menu items for Signup and Login do not appear on the dropdown.
Test example from view/layouts/main.php -- all 8 items appear on the full bar but only 6, Who-Why, appear on the collapsed dropdown. I expect to see Signup and Login, or Logout, as well. I am reporting this as a potential bug as I am not seeing where the array would have changed.

$menuItems = [
['label' => 'Who', 'url' => ['/site/who']],
['label' => 'What', 'url' => ['/site/what']],
['label' => 'When', 'url' => ['/site/when']],
['label' => 'Where', 'url' => ['/site/where']],
['label' => 'How', 'url' => ['/site/how']],
['label' => 'Why', 'url' => ['/site/why']],
];
if (Yii::$app->user->isGuest) {
$menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
$menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
} else {
$menuItems[] = '

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

    Yii 2.024
    PHP 7.0.33
    Debian Stretch

    @samdark samdark added status:to be verified Needs to be reproduced and validated. type:bug Bug labels Aug 15, 2019
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    status:to be verified Needs to be reproduced and validated. type:bug Bug
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants