KnpLabs / KnpLabs/KnpMenuBundle
Tutorial/Dropdown for Symfony 4.2, bootstrap(s), etc, navbar, dropdown, etc.
- Dominant language
- PHP
- Stars
- 1.4k
- Forks
- 202
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 2
Description
I'm having a really hard time creating a simple bootstrap navbar with a dropdown.
There are LOTS of webpages that describe how to do it, but I haven't had any luck with any solution, except to use MopaBootstrapBundle, which seems like overkill for just a navbar.
In the same way that Symfony forms has a few built-in options (bootstrap_3_horizontal, etc.), I basically want to simply set the twig theme and then configure the top navbar, side navbar, etc.
Part of the confusion is how many options there are. Many of them examples on the web add the class and attributes in the menu creation, but that seems like a very bad practice, to lock in that a menu item is of the navbar-item class. That'd make more sense when rendering the menu (from the twig template).
Regardless, despite hours of hacking I'm unable to get a simple bootstrap navbar or sidebar menu working. Can anyone point me to a working example of a navbar with dropdown that includes a MenuBuilder class, the html/twig that renders it?
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are named. Start by reviewing the existing Symfony menu and Twig documentation, then determine where a Symfony 4.2 and Bootstrap example belongs; done means a documented working navbar or sidebar dropdown with a MenuBuilder class and its HTML/Twig rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, php, symfony
- Domain
- documentation, frontend
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100