Skip to content
Snippets Groups Projects
Commit 1a0555e0 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

fix menu iterator

parent 2ee4204c
No related branches found
No related tags found
2 merge requests!997Release,!995Release
{% extends "styleguide2/contact_page.html" with show_regional_contacts=True %} {% include "styleguide2/contact_page.html" with show_regional_contacts=True %}
{% extends "styleguide2/contact_page.html" with show_regional_contacts=True %} {% include "styleguide2/contact_page.html" with show_regional_contacts=True %}
...@@ -247,7 +247,13 @@ class PageInMenuMixin(Page): ...@@ -247,7 +247,13 @@ class PageInMenuMixin(Page):
else parent_instance 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.block_type == "menu_item":
if menu.value["page"] is None: if menu.value["page"] is None:
continue continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment