add redirect type code in tree.jinja2