Added the ability to create a new page by setting `action='newPage'`.