Order the entries and section given the priority field