Completed working through the if template tag