correctly save page template field to db