Order the menu tree before sending it to the client