T
T
Timofey2020-04-24 19:18:56
Yii
Timofey, 2020-04-24 19:18:56

How to add an icon to the NavBar widget?

NavBar::begin([
        'brandLabel' => Yii::$app->name,
        'brandUrl' => Yii::$app->homeUrl,
        'options' => [
            'class' => 'navbar navbar-default navbar-fixed-top',
            'id' =>'custom-bootstrap-menu'

        ],

    ]);
    $menuItems = [
        ['label' => 'Home', 'url' => ['/']],
        ['label' => 'About', 'url' => ['/about']],
        ['label' => 'Contact', 'url' => ['/contact']],
    ];
echo Nav::widget([
        'options' => ['class' => 'navbar-nav navbar-right'],
        'encodeLabels' => false,
        'items' => $menuItems,
    ]);
    NavBar::end();


Tell me how to add a basket icon to the menu (for example), so that it remains visible when the menu is hidden under a burger on small screens. It is necessary that the logo, burger and basket icon remain.
Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question