insert templates at cursor location, submenus created if template.items.length, GMS templates added