Skip to content

Children attributes #90

Description

@wagnerdracha

Hi

how to insert a attributes in children menu:
<li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Cadastros <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="#" data-jsPanel-width="600" data-jsPanel-height="500" data-url="home/elevatoria">Teste</a></li> </ul> </li>

I do this:

Menu::make('example', function(Builder $menu) { $menu->add('Cadastros', '#')->attribute(['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'role' => 'button', 'aria-haspopup' => 'true', 'aria-expanded' => 'false']); $menu->cadastros->add('Teste', '#')->attribute(['data-jsPanel-width' => '600', 'data-jsPanel-height' => '500', 'data-url' => 'home/elevatoria']); });

But don't work. Return this:

<li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Cadastros <b class="caret"></b> </a> <ul class="dropdown-menu"> <li><a href="#">Teste</a></li> </ul> </li>

Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions