diff --git a/elections/templates/elections/elections_contact_page.html b/elections/templates/elections/elections_contact_page.html index 00b3d628792173dc4f484cdb2dd2ea48b68bfdd1..263a5e5cd1834f394ab86cdb1c5b153fe55da09a 100644 --- a/elections/templates/elections/elections_contact_page.html +++ b/elections/templates/elections/elections_contact_page.html @@ -1 +1 @@ -{% extends "styleguide2/contact_page.html" with show_regional_contacts=True %} +{% include "styleguide2/contact_page.html" with show_regional_contacts=True %} diff --git a/main/templates/main/main_contact_page.html b/main/templates/main/main_contact_page.html index 00b3d628792173dc4f484cdb2dd2ea48b68bfdd1..263a5e5cd1834f394ab86cdb1c5b153fe55da09a 100644 --- a/main/templates/main/main_contact_page.html +++ b/main/templates/main/main_contact_page.html @@ -1 +1 @@ -{% extends "styleguide2/contact_page.html" with show_regional_contacts=True %} +{% include "styleguide2/contact_page.html" with show_regional_contacts=True %} diff --git a/shared/models/main.py b/shared/models/main.py index d27601a162383d9f5e74d64de23833889c84026a..c708723b7e8ff2134145b92848f20a02a4c47c89 100644 --- a/shared/models/main.py +++ b/shared/models/main.py @@ -247,7 +247,13 @@ class PageInMenuMixin(Page): else parent_instance ) - for menu in instance.root_page.menu: + menu_iterator = ( + instance.root_page.menu + if hasattr(instance, "root_page") + else instance.menu + ) + + for menu in menu_iterator: if menu.block_type == "menu_item": if menu.value["page"] is None: continue