A
A
akula222016-04-05 18:45:33
Yii
akula22, 2016-04-05 18:45:33

How to remove class nav from yii\bootstrap\Nav?

In the menu I specify the option
'options' => ['class' => 'main-nav'],
on the output I get class="main-nav nav" how to remove the extra nav ?
why add it at all?
I need a menu like this

<li><a class="ico ico-catalog" href="#">Каталог</a></li>
                    <li><a class="ico ico-works" href="#">Работы</a></li>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
akula22, 2016-04-05
@akula22

The issue was resolved

'template' => '<a href="{url}" class="ico ico-about">{label}</a>',

N
Nikita, 2016-04-05
@bitver

You are using yii\bootstrap\Nav, bootstrap!
Of course there will be nav, it's an essential part of bootstrap navigation. Use native widgets if you need something of your own.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question