Answer the question
In order to leave comments, you need to log in
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();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question