added page codeon create to get the correct index of the array for updating purposes.  this code could be refactored.  see the PagesController updateAction