I've got a plugin with a custom element. It evolved based on the basics laid out in the P&T Events sample plugin.
On my element's index page, there's a big button to create a "New Element". When you click on it, you see a dropdown list of every available group for the new element:
This is the result generated by the code in the Events example.
However, I really want a split button format, like Craft provides for its entries:
The advantage there would be the "one click" add, if you're already viewing the target group.
I've tried copy & pasting various HTML from the
entries template, but that doesn't really seem to be doing the trick. I suspect JS is playing a large role in generating that menu, but I haven't quite figured it out yet.
How can I make a split-style button for my custom element?