added code for viewing data of post and adding page list