How to have multiple pages using fewer conditional statements