Add sorting to index pages