{% set projectname = project.name %} {# all_tgp_contents is passed from the route (pre-computed, flask.g-cached) — it is the single source of truth for upload/published state. #} {# Map other_file_type to the TextGrid title used as key in all_tgp_contents #} {% set other_file_titles = {"other_files": "other files", "portalconfig": "portalconfig.xml", "readme": "README.md"} %} {% set title = collection or other_file_titles.get(other_file_type, other_file_type) %}