Used will_paginate to add pagination for topics and posts