12955-add-terms-link-footer #11

Merged
mravi merged 12 commits from 12955-add-terms-link-footer into master 2024-07-19 14:43:54 +00:00
Showing only changes of commit 454767b551 - Show all commits

View file

@ -77,13 +77,16 @@ def menuitems_children(parent, context=None):
menuitems_children = parent.get_children().live().in_menu().specific()
items_to_remove = []
for menuitem in menuitems_children:
print('type => %s' % type(menuitem))
try:
if 'devenez' in menuitem.title.lower() and remove_devenez:
items_to_remove.append(menuitem)
elif 'mitglied werden' in menuitem.title.lower() and remove_mitglied:
items_to_remove.append(menuitem)
menuitem.title = menuitem.trans_title
except AttributeError:
#menuitem.title = menuitem.trans_title
if context:
print(" title=%s ---- trans_title=%s" % (menuitem.title, menuitem.trans_title))
except AttributeError as ae:
print("Menuitem %s has an issue :: %s" % (menuitem.title, str(ae)))
pass
for item in items_to_remove:
@ -100,6 +103,11 @@ def menuitems_children(parent, context=None):
menuitems_children.append(custom_page)
page_ids = [page.id for page in menuitems_children]
menuitems_children = Page.objects.filter(id__in=page_ids).specific()
for menuitem in menuitems_children:
try:
menuitem.title = menuitem.trans_title
except AttributeError as aee:
pass
return menuitems_children
# Retrieves the children of the top menu items for the drop downs