diff --git a/djangocms_blog/menu.py b/djangocms_blog/menu.py index a6e3b6e..9764691 100644 --- a/djangocms_blog/menu.py +++ b/djangocms_blog/menu.py @@ -38,9 +38,14 @@ class BlogNavModifier(Modifier): if not post_cut: return nodes if not hasattr(request, 'toolbar'): return nodes - if request.toolbar.get_object_model() != 'djangocms_blog.post': + models = ('djangocms_blog.post', 'djangocms_blog.blogcategory') + model = request.toolbar.get_object_model() + if model not in models: return nodes - cat = request.toolbar.obj.categories.first() + if model == 'djangocms_blog.blogcategory': + cat = request.toolbar.obj + else: + cat = request.toolbar.obj.categories.first() if not cat: return nodes for node in nodes: