Hi,
Ive been trying to find a way to add a custom “section” within the Context Sidebar, but not found anything that actually worked. I thought maybe settings “sections” within the manifest file might work but it didnt.
There’s no direct way to do that, that I’m aware of but I would create a bunch of entityAction items. The first would be a custom element which would be the title, then the rest would be the actual entity actions you want.
OR you could create one entity action that did the entire group, but you’d have to deal with the rendering of the elements yourself.
For inspiration on your custom element, the trail in the source code leads to the default element for the entityAction being the UmbEntityActionDefaultElement
Yep Rich is bang on the money, there is no default way of doing this with the built in ‘kind’ for an entityAction, so you need to then implement your own WebComponent element which then you would need to also render out child entity actions, which you could do manually in the same component or you could try to do what the CMS does and use the umb-extension-with-api-slot component to render and filter your specific extensions that perhaps start with a specfic prefix in your alias that starts with OwainWilliam.EnttiyAction. or something.
Anyway happy hacking and look forward to hearing/seeing how you get on.
Hi Owain, a late follow-up: this ships in Umbraco 19, which is now in RC
From 19, entity actions can be grouped. You register an entityActionGroup and point your actions at it with group. The menu renders each group as its own block with a line between groups, so your actions stay together whichever of them are visible:
One difference from what you sketched: the group label isn’t shown as a heading. It’s the group’s accessible name (role="group"), so screen readers announce it. You get the grouping and the separators, but no visible heading. If one of the built-in groups fits, you can also join it (for example UMB_ENTITY_ACTION_GROUP_IMPORT_EXPORT) instead of registering your own.