add category view url with id instead of slug to make BlogCategory.get_absolute_url() work in any case
This commit is contained in:
parent
74a78fc5a4
commit
f55af7d036
1 changed files with 2 additions and 2 deletions
|
@ -15,12 +15,12 @@ class BlogCategoryMenu(CMSAttachMenu):
|
|||
def get_nodes(self, request):
|
||||
nodes = []
|
||||
qs = BlogCategory.objects.translated(get_language())
|
||||
qs = qs.order_by('parent_id', 'translations__name').distinct()
|
||||
qs = qs.order_by('parent_id', 'translations__name')
|
||||
for category in qs:
|
||||
kwargs = { 'category': category.slug }
|
||||
node = NavigationNode(
|
||||
category.name,
|
||||
reverse('djangocms_blog:posts-category', kwargs=kwargs),
|
||||
category.get_absolute_url(),
|
||||
category.pk,
|
||||
category.parent_id
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue