dryed up the code to display content if you click on a title