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