put the indexing of posts, and the displaying of errors into a partial