Sort tab links before adding to menu