- Issue created by @diegopino
-
danchadwick β
committed 0e6f84c3 on 6.0.x
Issue #3486275 by diegopino, danchadwick:...
-
danchadwick β
committed 0e6f84c3 on 6.0.x
- πΊπΈUnited States danchadwick Boston
@diegopino: thank you for the thorough report and suggested solution. I followed your ideas. Please re-open if you need further improvements (after adjusting your template to correspond to the one in the starter kit).
This commit fixes a number of things:
- The first link becomes the button. It retains any existing attributes.
- The dropdown_button_attributes passed to the dropdown component are now actually used.
- The preprocess function does not add classes. That's left to the template where it's easy to customize.
- The first link, which becomes the button, is left as the first element in the links variable in case your subtheme needs it.
- The link is now generated natively. This means that to add classes, the same care must be taken to avoid the core bug as happens with local tasks. A (ugh) global function was created to help with this.
- The split variable is now calculated in the preprocess and passed to the dropdown component.
- The menu block no longer needs to be passed to the dropdown component.NOTE TO EXISTING 6.0 RELEASE CANDIDATE USERS: You will need to copy a new links--dropdown.html.twig file from the starter kit to your subtheme and customize it to your liking.