trans_title optional
This commit is contained in:
parent
4869a79b43
commit
dd52f23d54
1 changed files with 4 additions and 2 deletions
|
@ -39,6 +39,7 @@ def top_menu(context, parent, calling_page=None):
|
|||
menuitem.show_dropdown = has_menu_children(menuitem)
|
||||
menuitem.active = (calling_page.url.startswith(menuitem.url)
|
||||
if calling_page else False)
|
||||
if 'trans_title' in menuitem:
|
||||
menuitem.title = menuitem.trans_title
|
||||
return {
|
||||
'calling_page': calling_page,
|
||||
|
@ -49,6 +50,7 @@ def top_menu(context, parent, calling_page=None):
|
|||
def menuitems_children(parent):
|
||||
menuitems_children = parent.get_children().live().in_menu().specific()
|
||||
for menuitem in menuitems_children:
|
||||
if 'trans_title' in menuitem:
|
||||
menuitem.title = menuitem.trans_title
|
||||
return menuitems_children
|
||||
|
||||
|
|
Loading…
Reference in a new issue