Remove empty items from menu
This commit is contained in:
parent
55dd96570c
commit
c448562384
2 changed files with 4 additions and 2 deletions
|
|
@ -37,6 +37,8 @@ class TestMenu(CMSAttachMenu):
|
|||
section_hash = request.build_absolute_uri()
|
||||
if hasattr(plugin, 'menu_text'):
|
||||
menu_text = plugin.menu_text
|
||||
if menu_text.strip() == '':
|
||||
continue
|
||||
menu_words = menu_text.split()
|
||||
if len(menu_words) > 0:
|
||||
section_hash = '{}#{}'.format(
|
||||
|
|
@ -56,4 +58,4 @@ class TestMenu(CMSAttachMenu):
|
|||
return nodes
|
||||
|
||||
|
||||
menu_pool.register_menu(TestMenu)
|
||||
menu_pool.register_menu(TestMenu)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue