Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute of menu and menu item are not working properly. #309

Open
nkhoangvu opened this issue May 31, 2024 · 2 comments
Open

Attribute of menu and menu item are not working properly. #309

nkhoangvu opened this issue May 31, 2024 · 2 comments

Comments

@nkhoangvu
Copy link

nkhoangvu commented May 31, 2024

Hi there, I met 2 issues when using your package. I hope you can help

1 - When I use the below method:

{!! $menu->asUl( ['class' => 'first-level-ul'], ['class' => 'second-level-ul'], ['class' => 'second-level-li'] ) !!}

the 'second-level-li' will appear twice in li tag, for example:
<li class="second-level-li second-level-li">

2 - When I add atribute attr() to each link when create menu, for example:
$menu->add(trans($link->name), ['url' => $link->link])
->prepend($link->prepend)
->append($link->append)
->nickname($link->nickname)
->data('order', $link->dis_order)
->link->attr(['class' => $link->class]);
active status of links which have no sub menu items cannot be active anymore because there is no 'active' css class in tag.

@nkhoangvu
Copy link
Author

Is there any solution for this situation? Thank you.

@dustingraham
Copy link
Collaborator

Is there any solution for this situation? Thank you.

This is not presently actively maintained. We can review lightweight PRs, but I don't have time to dig into the code to figure out why it is behaving the way that you describe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants