add redirect option in template