modifier must work on two menu structures when run in django-cms apphook context

This commit is contained in:
Tadas Dailyda 2015-07-21 00:34:17 +03:00
parent 8b69e90e55
commit 352383dad9
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ class BlogNavModifier(Modifier):
if (node.namespace.startswith(BlogCategoryMenu.__name__) and
cat.pk == node.id):
node.selected = True
break
# no break here because django-cms maintains two menu structures
# for every apphook (attached to published page and draft page)
return nodes
menu_pool.register_modifier(BlogNavModifier)