D
D
Danil Razumkov2018-02-04 08:02:37
Yii
Danil Razumkov, 2018-02-04 08:02:37

Yii Why doesn't this construction work?

Why doesn't the menu template change, it says in the docs that it can be changed, but nothing happens...
Here is the code,

echo Menu::widget([            
               'items' => [
                   ['label' => 'Главная', 'url' => ['site/index']],
                   ['label' => 'Все посты', 'url' => ['site/buy']]
               ],
                'labelTemplate' => '{label}',
                 'submenuTemplate' => '<div class="main_menu">{items}</div>'
            ]);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-02-04
@slo_nik

Good morning.
It is also in the documentation linkTemplateand can be further configured in items
ps. These are just guesses what exactly you need. Describe in detail, with an example of the html you want to get.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question