Fix bug footer menu items not translated
This commit is contained in:
parent
31a0a6b060
commit
780a4ce2d7
1 changed files with 2 additions and 4 deletions
|
@ -78,15 +78,13 @@ def menuitems_children(parent, context=None):
|
|||
items_to_remove = []
|
||||
for menuitem in menuitems_children:
|
||||
try:
|
||||
if type(menuitem) == ContactForm:
|
||||
menuitem.title = menuitem.title
|
||||
else:
|
||||
menuitem.title = menuitem.trans_title
|
||||
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:
|
||||
print("Menuitem %s has an issue :: %s" % (menuitem.title, str(ae)))
|
||||
pass
|
||||
for item in items_to_remove:
|
||||
menuitems_children = menuitems_children & Page.objects.not_page(item)
|
||||
|
|
Loading…
Reference in a new issue