SOLVED: Phone Number in the NavBar

Hi all,

I would like to add a phone number after the logo in the NavBar & before the normal $menuItems = [‘label’ => ‘About’, ‘url’ => [’/site/about’]],. Is this possible? How do you achieve this? Where in the docs do I need to go?



You can do it by adding an item in the NavBar Widget. See documentation here

The navbar is probably rendered in the main layout in views/layouts/main.php

If an item is a string, it is outputed without Html::encode, that mean you can put what ever you want. A simple way is:

       'items' => [

            '<li><a>+41 122 23 33</a></li>',

            ['label' => 'Home', 'url' => ['/site/index']],

hope that helps,

Thank you Marc. This was exactly what I needed. I apologize for not getting back on here to respond earlier.

Thanks Again!