Re-format the pages_index html code