https://sourceforge .net/tracker/ index.php? func=detail& aid=2344698& group_\
When calling removeItem() on a Menu in 2.6.0, the current behaviour is
to also remove the parent UL tag from a menu group, when the last of the
group's MenuItems has been removed. This is sensible default behaviour
to clear up the DOM in most cases.
To support our requirement to be able to reconstruct an empty group from
an existing menu, I created the patch referred to above. The patch adds
a new optional parameter "p_keepEmptyGroup" to removeItem() to prevent
this empty UL tag being removed.
Of course, if there's an existing way to do this with the API please let
(Lead UI Engineer, Alfresco)