Fix footer menu lang
This commit is contained in:
parent
51e3a70922
commit
abb3935cd7
1 changed files with 8 additions and 6 deletions
|
@ -37,24 +37,26 @@ def top_menu(context, parent, calling_page=None):
|
|||
'request': context['request'],
|
||||
}
|
||||
|
||||
# Retrieves the children of the top menu items for the drop downs
|
||||
@register.inclusion_tag('tags/top_menu_children.html', takes_context=True)
|
||||
def top_menu_children(context, parent):
|
||||
def menuitems_children(parent):
|
||||
menuitems_children = parent.get_children().live().in_menu().specific()
|
||||
for menuitem in menuitems_children:
|
||||
menuitem.title = menuitem.trans_title
|
||||
return menuitems_children
|
||||
|
||||
# Retrieves the children of the top menu items for the drop downs
|
||||
@register.inclusion_tag('tags/top_menu_children.html', takes_context=True)
|
||||
def top_menu_children(context, parent):
|
||||
return {
|
||||
'parent': parent,
|
||||
'menuitems_children': menuitems_children,
|
||||
'menuitems_children': menuitems_children(parent),
|
||||
'request': context['request'],
|
||||
}
|
||||
|
||||
# Retrieves the footer menu items
|
||||
@register.inclusion_tag('tags/footer_menu.html', takes_context=True)
|
||||
def footer_menu(context, parent, calling_page=None):
|
||||
menuitems = parent.get_children().live().in_menu()
|
||||
return {
|
||||
'calling_page': calling_page,
|
||||
'menuitems': menuitems,
|
||||
'menuitems': menuitems_children(parent),
|
||||
'request': context['request'],
|
||||
}
|
Loading…
Reference in a new issue