Answer the question
In order to leave comments, you need to log in
How to use badge AdminLTE on yii2?
How to add such a badge to the menu?
Here is the add-on itself: https://github.com/dmstr/yii2-adminlte-asset
I didn't find anything there in the config and description, but there are badges in the demo .
Answer the question
In order to leave comments, you need to log in
So, in the documentation for the package it is written
If you need to separate sections of the menu then just add the header option to item in items
'items' => [
['label' => 'Gii', 'iconType' => 'far' 'icon' => 'file -code', 'url' => ['/gii']],
['label' => 'Debug', 'icon' => 'dashboard-alt', 'url' => ['/debug']] ,
['label' => 'MAIN NAVIGATION', 'header' => true], // here
// ... a group items
['label' => '', 'header' => true],
// ... a group items
['label' => '', 'header' => true],
// ...a group items
To add a badge for an item:
'items' => [
[
'label' => 'Mailbox',
'iconType' => 'far',
'icon' => 'envelope',
'url' => ['/mailbox'],
'badge' => '123'
],
]
...
'badge' => '<span class="badge badge-info right">123</span>'
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question