Created a function to create new pages from templates