How to correctly remove the list of ul , li list tags from the widget? Example


Widget

 echo Nav::widget([ 'options' => ['class' => 'nav nav-tabs border-0 flex-column flex-lg-row'], 'encodeLabels' => false, 'items' => $items ]) 

gives the structure of the form

 <ul> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> </ul> 

I also need the issuance of this type

 <div class="my_dropdown_class"> <a href="#">Link</a> <a href="#">Link</a> <a href="#">Link</a> </div> 
  • one
    Redefine the method that is responsible for the output and you will be happy. - Nikolaj Sarry
  • The change of ul probably answered by 'container' => 'div' , but I could be wrong, for li , I would rather have to rewrite the output template. - Dima

0