fix addMenuItem for nested external pages