diff --git a/betty/assets/templates/base.html.j2 b/betty/assets/templates/base.html.j2 index d2a68904f..b3f93f464 100644 --- a/betty/assets/templates/base.html.j2 +++ b/betty/assets/templates/base.html.j2 @@ -13,8 +13,8 @@ {% endif %} - {% if page_resource is defined and page_recource is has_files %} - {% for file in page_resource.files %} + {% if file_resource is defined and file_resource is has_files %} + {% for file in file_resource.files %} {% if file.media_type.startswith('image/') %} {% if file.description %} @@ -22,11 +22,11 @@ {% endif %} {% endif %} {% endfor %} - - {% if page_resource is defined and page_resource is resource and resource is identifiable %} - + + {% if file_resource is defined and file_resource is resource and resource is identifiable %} + {% endif %} {% endif %} @@ -46,8 +46,8 @@ {% endfor %} {% endfor %} -{% if page_resource is has_files %} - {% set page_image = page_resource.associated_files | selectattr('media_type', 'starts_with', 'image/') | first %} +{% if file_resource is has_files %} + {% set page_image = file_resource.associated_files | selectattr('media_type', 'starts_with', 'image/') | first %} {% elif site.configuration.theme.background_image_id and site.configuration.theme.background_image_id in site.ancestry.files %} {% set page_image = site.ancestry.files[site.configuration.theme.background_image_id] %} {% endif %} @@ -100,7 +100,7 @@ - {% if page_resource is defined and site.configuration.multilingual %} + {% if file_resource is defined and site.configuration.multilingual %}