Added logic to generate tag pages